Cache: create missing hash entries from previous versions of the cache file

This commit is contained in:
Josh Holtrop 2013-09-19 09:43:00 -04:00
parent 97e11f45e5
commit e63b4c932f

View File

@ -60,11 +60,10 @@ module Rscons
# Create a Cache object and load in the previous contents from the cache # Create a Cache object and load in the previous contents from the cache
# file. # file.
def initialize def initialize
@cache = YAML.load(File.read(CACHE_FILE)) rescue { @cache = YAML.load(File.read(CACHE_FILE)) rescue {}
targets: {}, @cache[:targets] ||= {}
directories: {}, @cache[:directories] ||= {}
version: VERSION, @cache[:version] ||= VERSION
}
@lookup_checksums = {} @lookup_checksums = {}
end end