Skip to content

Commit

Permalink
Merge pull request #270 from nleclerc/fixEmptyEntryError
Browse files Browse the repository at this point in the history
Fixed async decompression of empty zip entries.
  • Loading branch information
cthackers committed Feb 6, 2020
2 parents 8176b02 + e64e32c commit 4cc87b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zipEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ module.exports = function (/*Buffer*/input) {
}

var compressedData = getCompressedDataFromZip();

if (compressedData.length === 0) {
if (async && callback) callback(compressedData, Utils.Errors.NO_DATA);//si added error.
// File is empty, nothing to decompress.
if (async && callback) callback(compressedData);
return compressedData;
}

Expand Down

0 comments on commit 4cc87b9

Please sign in to comment.