Skip to content

Commit 8533d67

Browse files
committed
fix extra data lost when write zip
1 parent 9e52c3f commit 8533d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zipFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) {
259259
// 1.2. postheader - data after data header
260260
const postHeader = Buffer.alloc(entryNameLen + entry.extra.length);
261261
entry.rawEntryName.copy(postHeader, 0);
262-
postHeader.copy(entry.extra, entryNameLen);
262+
entry.extra.copy(postHeader, entryNameLen);
263263

264264
// 2. offsets
265265
const dataLength = dataHeader.length + postHeader.length + compressedData.length;

0 commit comments

Comments
 (0)