Skip to content

Commit

Permalink
Merge pull request #449 from yfdyh000/pr-fixExtra
Browse files Browse the repository at this point in the history
fix extra data lost when write zip
  • Loading branch information
cthackers authored Mar 13, 2024
2 parents d95c063 + 8533d67 commit a366095
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 @@ -260,7 +260,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 a366095

Please sign in to comment.