From e64e32cc0e9dbbe53d7ac2bb8b63f76dd6fe5f2a Mon Sep 17 00:00:00 2001 From: Nicolas Leclerc Date: Fri, 7 Dec 2018 11:17:27 +0100 Subject: [PATCH] Removed improperly raised error while decompressing empty file asynchronously. --- zipEntry.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zipEntry.js b/zipEntry.js index e9efc7e..4921136 100644 --- a/zipEntry.js +++ b/zipEntry.js @@ -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; }