Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:sproutit/sproutcore-abbot

  • Loading branch information...
commit be4518676542a80a0c47c60a06d21a18ec2112b6 2 parents 39c6490 + b3b2067
Yehuda Katz wycats authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/sproutcore/models/target.rb
6 lib/sproutcore/models/target.rb
View
@@ -346,7 +346,11 @@ def file_attr(attr_name, path, &block)
# read cache from disk if needed
if @file_attr_cache.nil? && File.exists?(file_attr_cache_path)
- @file_attr_cache = JSON.parse File.read(file_attr_cache_path)
+ begin
+ @file_attr_cache = JSON.parse File.read(file_attr_cache_path)
+ rescue JSON::ParserError
+ # Unparseable, will be handled by the following conditional
+ end
# Sometimes the file is corrupted, in this case, clear the cache
File.delete file_attr_cache_path unless @file_attr_cache
Please sign in to comment.
Something went wrong with that request. Please try again.