diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/fs/lua.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index a95e7c51..ea16b728 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua | |||
| @@ -611,8 +611,10 @@ local function http_request(url, http, cached) | |||
| 611 | if result then | 611 | if result then |
| 612 | if cached and headers["last-modified"] then | 612 | if cached and headers["last-modified"] then |
| 613 | local tsfd = io.open(cached..".timestamp", "w") | 613 | local tsfd = io.open(cached..".timestamp", "w") |
| 614 | tsfd:write(headers["last-modified"]) | 614 | if tsfd then |
| 615 | tsfd:close() | 615 | tsfd:write(headers["last-modified"]) |
| 616 | tsfd:close() | ||
| 617 | end | ||
| 616 | end | 618 | end |
| 617 | return table.concat(result) | 619 | return table.concat(result) |
| 618 | else | 620 | else |
