From 4ffedb750f3d5b51e1934b65a8e5a858353913c9 Mon Sep 17 00:00:00 2001 From: Thomas Benndorf <thomas@br24.com> Date: Thu, 4 Jul 2024 15:01:13 +0700 Subject: [PATCH] fixed zip64 entry condition --- lib/Open/directory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Open/directory.js b/lib/Open/directory.js index 20b9e5f..b45059e 100644 --- a/lib/Open/directory.js +++ b/lib/Open/directory.js @@ -121,7 +121,7 @@ module.exports = function centralDirectory(source, options) { // https://github.com/golang/go/blob/master/src/archive/zip/reader.go#L503 // For zip64 files, need to find zip64 central directory locator header to extract // relative offset for zip64 central directory record. - if (vars.numberOfRecords == 0xffff|| vars.numberOfRecords == 0xffff || + if (vars.diskNumber == 0xffff || vars.numberOfRecords == 0xffff || vars.offsetToStartOfCentralDirectory == 0xffffffff) { // Offset to zip64 CDL is 20 bytes before normal CDR