aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/tools/zip.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/luarocks/tools/zip.lua b/src/luarocks/tools/zip.lua
index 5974c7bf..f08162c5 100644
--- a/src/luarocks/tools/zip.lua
+++ b/src/luarocks/tools/zip.lua
@@ -306,7 +306,7 @@ end
306 306
307 307
308local function ziptime_to_luatime(ztime, zdate) 308local function ziptime_to_luatime(ztime, zdate)
309 return { 309 local date = {
310 year = shr(zdate, 9) + 1980, 310 year = shr(zdate, 9) + 1980,
311 month = shr(lowbits(zdate, 9), 5), 311 month = shr(lowbits(zdate, 9), 5),
312 day = lowbits(zdate, 5), 312 day = lowbits(zdate, 5),
@@ -314,6 +314,11 @@ local function ziptime_to_luatime(ztime, zdate)
314 min = shr(lowbits(ztime, 11), 5), 314 min = shr(lowbits(ztime, 11), 5),
315 sec = lowbits(ztime, 5) * 2, 315 sec = lowbits(ztime, 5) * 2,
316 } 316 }
317
318 if date.month == 0 then date.month = 1 end
319 if date.day == 0 then date.day = 1 end
320
321 return date
317end 322end
318 323
319local function read_file_in_zip(zh, cdr) 324local function read_file_in_zip(zh, cdr)