aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Roman <george.roman.99@gmail.com>2018-05-30 13:28:50 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-05-30 15:58:24 -0300
commit4b964d2d14882e0593eda548196cd72c0c95f1a9 (patch)
tree08e005e32f3c95aa7277d48f16ca958663db685e
parentd28b6669bdc28318bed47d37cfa6968a07654a23 (diff)
downloadluarocks-4b964d2d14882e0593eda548196cd72c0c95f1a9.tar.gz
luarocks-4b964d2d14882e0593eda548196cd72c0c95f1a9.tar.bz2
luarocks-4b964d2d14882e0593eda548196cd72c0c95f1a9.zip
Remove the empty file resulted when fs.download fails
-rw-r--r--src/luarocks/fs/tools.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/luarocks/fs/tools.lua b/src/luarocks/fs/tools.lua
index de216353..8419f7d3 100644
--- a/src/luarocks/fs/tools.lua
+++ b/src/luarocks/fs/tools.lua
@@ -129,6 +129,7 @@ function tools.use_downloader(url, filename, cache)
129 if ok then 129 if ok then
130 return true, filename 130 return true, filename
131 else 131 else
132 os.remove(filename)
132 return false 133 return false
133 end 134 end
134end 135end