aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-11-17 15:24:48 -0200
committerHisham Muhammad <hisham@gobolinux.org>2013-11-17 15:24:48 -0200
commit64ca4ac45a4e5dad245f6f1c3dd93b097ec55c89 (patch)
tree1acffc072fb93a26670e9773947356736b99609a
parentde9c9823b9a3e5a0c712bcf23f30d800c18825a4 (diff)
downloadluarocks-64ca4ac45a4e5dad245f6f1c3dd93b097ec55c89.tar.gz
luarocks-64ca4ac45a4e5dad245f6f1c3dd93b097ec55c89.tar.bz2
luarocks-64ca4ac45a4e5dad245f6f1c3dd93b097ec55c89.zip
Make sure manifest unzips properly, to avoid stale manifests.
Diffstat (limited to '')
-rw-r--r--src/luarocks/manif.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua
index 9feb35ce..1c7707a9 100644
--- a/src/luarocks/manif.lua
+++ b/src/luarocks/manif.lua
@@ -139,9 +139,11 @@ function load_manifest(repo_url)
139 if pathname:match(".*%.zip$") then 139 if pathname:match(".*%.zip$") then
140 local dir = dir.dir_name(pathname) 140 local dir = dir.dir_name(pathname)
141 fs.change_dir(dir) 141 fs.change_dir(dir)
142 local nozip = pathname:match("(.*)%.zip$")
143 fs.delete(nozip)
142 fs.unzip(pathname) 144 fs.unzip(pathname)
143 fs.pop_dir() 145 fs.pop_dir()
144 pathname = pathname:match("(.*)%.zip$") 146 pathname = nozip
145 end 147 end
146 return manif_core.manifest_loader(pathname, repo_url) 148 return manif_core.manifest_loader(pathname, repo_url)
147end 149end