From 8533d675bb5fd2b2dbd6724716c0defe1b73967d Mon Sep 17 00:00:00 2001 From: YFdyh000 Date: Wed, 15 Mar 2023 05:51:44 +0800 Subject: [PATCH] fix extra data lost when write zip --- zipFile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipFile.js b/zipFile.js index 997226a..9cf0729 100644 --- a/zipFile.js +++ b/zipFile.js @@ -259,7 +259,7 @@ module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) { // 1.2. postheader - data after data header const postHeader = Buffer.alloc(entryNameLen + entry.extra.length); entry.rawEntryName.copy(postHeader, 0); - postHeader.copy(entry.extra, entryNameLen); + entry.extra.copy(postHeader, entryNameLen); // 2. offsets const dataLength = dataHeader.length + postHeader.length + compressedData.length;