Skip to content

Commit

Permalink
Removed improperly raised error while decompressing empty file asynch…
Browse files Browse the repository at this point in the history
…ronously.
  • Loading branch information
nleclerc committed Dec 7, 2018
1 parent cb300c9 commit e64e32c
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 e64e32c

Please sign in to comment.