diff options
| -rw-r--r-- | src/luarocks/manif.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua index 9026bc5b..45130696 100644 --- a/src/luarocks/manif.lua +++ b/src/luarocks/manif.lua | |||
| @@ -72,7 +72,12 @@ local function fetch_manifest_from(repo_url, filename) | |||
| 72 | local cache_dir = dir.path(cfg.local_cache, name) | 72 | local cache_dir = dir.path(cfg.local_cache, name) |
| 73 | local ok = fs.make_dir(cache_dir) | 73 | local ok = fs.make_dir(cache_dir) |
| 74 | if not ok then | 74 | if not ok then |
| 75 | return nil, "Failed creating temporary cache directory "..cache_dir | 75 | cfg.local_cache = fs.make_temp_dir("local_cache") |
| 76 | cache_dir = dir.path(cfg.local_cache, name) | ||
| 77 | ok = fs.make_dir(cache_dir) | ||
| 78 | if not ok then | ||
| 79 | return nil, "Failed creating temporary cache directory "..cache_dir | ||
| 80 | end | ||
| 76 | end | 81 | end |
| 77 | local file, err, errcode, from_cache = fetch.fetch_url(url, dir.path(cache_dir, filename), true) | 82 | local file, err, errcode, from_cache = fetch.fetch_url(url, dir.path(cache_dir, filename), true) |
| 78 | if not file then | 83 | if not file then |
