diff options
-rw-r--r-- | src/luarocks/manif.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua index ed1780b3..3fb3e4e3 100644 --- a/src/luarocks/manif.lua +++ b/src/luarocks/manif.lua | |||
@@ -141,12 +141,18 @@ function load_manifest(repo_url) | |||
141 | end | 141 | end |
142 | end | 142 | end |
143 | if pathname:match(".*%.zip$") then | 143 | if pathname:match(".*%.zip$") then |
144 | pathname = fs.absolute_name(pathname) | ||
144 | local dir = dir.dir_name(pathname) | 145 | local dir = dir.dir_name(pathname) |
145 | fs.change_dir(dir) | 146 | fs.change_dir(dir) |
146 | local nozip = pathname:match("(.*)%.zip$") | 147 | local nozip = pathname:match("(.*)%.zip$") |
147 | fs.delete(nozip) | 148 | fs.delete(nozip) |
148 | fs.unzip(pathname) | 149 | local ok = fs.unzip(pathname) |
149 | fs.pop_dir() | 150 | fs.pop_dir() |
151 | if not ok then | ||
152 | fs.delete(pathname) | ||
153 | fs.delete(pathname..".timestamp") | ||
154 | return nil, "Failed extracting manifest file" | ||
155 | end | ||
150 | pathname = nozip | 156 | pathname = nozip |
151 | end | 157 | end |
152 | return manif_core.manifest_loader(pathname, repo_url) | 158 | return manif_core.manifest_loader(pathname, repo_url) |