Skip to content

Commit

Permalink
fix extra data lost when write zip
Browse files Browse the repository at this point in the history
  • Loading branch information
yfdyh000 committed Mar 16, 2023
1 parent 9e52c3f commit 8533d67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zipFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8533d67

Please sign in to comment.