diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2021-12-29 10:59:32 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2021-12-29 10:59:32 -0300 |
commit | 8dae2fce37b75c9c5eefb334b12cd2359ba48d7e (patch) | |
tree | 6967e02abeb7cbf287678649e0bca5761c46aba9 | |
parent | f267d1aeef249098d036724c82ab82d657eb76c5 (diff) | |
parent | 91b25d87b1852f0066e6875efe0bce7438ea1fb1 (diff) | |
download | luarocks-8dae2fce37b75c9c5eefb334b12cd2359ba48d7e.tar.gz luarocks-8dae2fce37b75c9c5eefb334b12cd2359ba48d7e.tar.bz2 luarocks-8dae2fce37b75c9c5eefb334b12cd2359ba48d7e.zip |
Merge branch 'master' of ssh://github.com/luarocks/luarocks
-rw-r--r-- | src/luarocks/tools/zip.lua | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/luarocks/tools/zip.lua b/src/luarocks/tools/zip.lua index 7803b509..82d582fa 100644 --- a/src/luarocks/tools/zip.lua +++ b/src/luarocks/tools/zip.lua | |||
@@ -329,19 +329,13 @@ local function read_file_in_zip(zh, cdr) | |||
329 | return nil, "failed reading Local File Header signature" | 329 | return nil, "failed reading Local File Header signature" |
330 | end | 330 | end |
331 | 331 | ||
332 | local lfh = {} | 332 | -- Skip over the rest of the zip file header. See |
333 | lfh.version_needed = lestring_to_number(zh:read(2)) | 333 | -- zipwriter_close_file_in_zip for the format. |
334 | lfh.bitflag = lestring_to_number(zh:read(2)) | 334 | zh:seek("cur", 22) |
335 | lfh.compression_method = lestring_to_number(zh:read(2)) | 335 | local file_name_length = lestring_to_number(zh:read(2)) |
336 | lfh.last_mod_file_time = lestring_to_number(zh:read(2)) | 336 | local extra_field_length = lestring_to_number(zh:read(2)) |
337 | lfh.last_mod_file_date = lestring_to_number(zh:read(2)) | 337 | zh:read(file_name_length) |
338 | lfh.crc32 = lestring_to_number(zh:read(4)) | 338 | zh:read(extra_field_length) |
339 | lfh.compressed_size = lestring_to_number(zh:read(4)) | ||
340 | lfh.uncompressed_size = lestring_to_number(zh:read(4)) | ||
341 | lfh.file_name_length = lestring_to_number(zh:read(2)) | ||
342 | lfh.extra_field_length = lestring_to_number(zh:read(2)) | ||
343 | lfh.file_name = zh:read(lfh.file_name_length) | ||
344 | lfh.extra_field = zh:read(lfh.extra_field_length) | ||
345 | 339 | ||
346 | local data = zh:read(cdr.compressed_size) | 340 | local data = zh:read(cdr.compressed_size) |
347 | 341 | ||