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
# file.
def initialize
@cache = YAML.load(File.read(CACHE_FILE)) rescue {
targets: {},
directories: {},
version: VERSION,
}
@cache = YAML.load(File.read(CACHE_FILE)) rescue {}
@cache[:targets] ||= {}
@cache[:directories] ||= {}
@cache[:version] ||= VERSION
@lookup_checksums = {}
end