Skip to content

Commit a366095

Browse files
authored
Merge pull request #449 from yfdyh000/pr-fixExtra
fix extra data lost when write zip
2 parents d95c063 + 8533d67 commit a366095

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
@@ -260,7 +260,7 @@ module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) {
260260
// 1.2. postheader - data after data header
261261
const postHeader = Buffer.alloc(entryNameLen + entry.extra.length);
262262
entry.rawEntryName.copy(postHeader, 0);
263-
postHeader.copy(entry.extra, entryNameLen);
263+
entry.extra.copy(postHeader, entryNameLen);
264264

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

0 commit comments

Comments
 (0)