diff --git a/tool/downloader.rb b/tool/downloader.rb index 0bcd8f31c3b6a9..2398fd7b046ecd 100644 --- a/tool/downloader.rb +++ b/tool/downloader.rb @@ -270,6 +270,7 @@ def self.download(url, name, dir = nil, since = true, options = {}) end dest = (cache_save && cache && !cache.exist? ? cache : file) dest.parent.mkpath + dest.unlink if dest.symlink? && !dest.exist? dest.open("wb", 0600) do |f| f.write(data) f.chmod(mode_for(data))