Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e4e9cce1c | ||
|
|
32d19489cb | ||
|
|
45a0d56c54 | ||
|
|
9b954d9d98 | ||
|
|
e63b4c932f |
No files matched your search
+9
-6
@@ -60,11 +60,14 @@ 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: {},
|
unless @cache.is_a?(Hash)
|
||||||
directories: {},
|
$stderr.puts "Warning: #{CACHE_FILE} was corrupt. Contents:\n#{@cache.inspect}"
|
||||||
version: VERSION,
|
@cache = {}
|
||||||
}
|
end
|
||||||
|
@cache[:targets] ||= {}
|
||||||
|
@cache[:directories] ||= {}
|
||||||
|
@cache[:version] ||= VERSION
|
||||||
@lookup_checksums = {}
|
@lookup_checksums = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -148,7 +151,7 @@ module Rscons
|
|||||||
def mkdir_p(path)
|
def mkdir_p(path)
|
||||||
parts = path.split(/[\\\/]/)
|
parts = path.split(/[\\\/]/)
|
||||||
(0..parts.size).each do |i|
|
(0..parts.size).each do |i|
|
||||||
subpath = File.join(*parts[0, i + 1])
|
subpath = File.join(*parts[0, i + 1]).encode(__ENCODING__)
|
||||||
unless File.exists?(subpath)
|
unless File.exists?(subpath)
|
||||||
FileUtils.mkdir(subpath)
|
FileUtils.mkdir(subpath)
|
||||||
unless @cache[:directories].include?(subpath)
|
unless @cache[:directories].include?(subpath)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module Rscons
|
module Rscons
|
||||||
# gem version
|
# gem version
|
||||||
VERSION = "0.0.8"
|
VERSION = "0.0.10"
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user