From 4b964d2d14882e0593eda548196cd72c0c95f1a9 Mon Sep 17 00:00:00 2001 From: George Roman Date: Wed, 30 May 2018 13:28:50 +0300 Subject: Remove the empty file resulted when fs.download fails --- src/luarocks/fs/tools.lua | 1 + 1 file changed, 1 insertion(+) 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) if ok then return true, filename else + os.remove(filename) return false end end -- cgit v1.2.3-55-g6feb