summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rw-r--r--tool/downloader.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index 0bcd8f31c3..2398fd7b04 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -270,6 +270,7 @@ class Downloader
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))