diff --git a/zipFile.js b/zipFile.js index 234f6cd..9cfcd75 100644 --- a/zipFile.js +++ b/zipFile.js @@ -291,10 +291,10 @@ module.exports = function (/*Buffer|null*/ inBuffer, /** object */ options) { const headerBlocks = []; let totalSize = 0; let dindex = 0; + let totalEntries = 0; mainHeader.size = 0; mainHeader.offset = 0; - totalEntries = 0; for (const entry of this.entries) { // compress data and set local and entry header accordingly. Reason why is called first