Skip to content

Commit

Permalink
Merge pull request #150 from ZJONSSON/filesizeknown
Browse files Browse the repository at this point in the history
Filesizeknown
  • Loading branch information
ZJONSSON committed Sep 8, 2019
2 parents cf47b10 + b6ebcd7 commit 955a5e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Open/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ module.exports = function centralDirectory(source, options) {
.on('close',resolve)
.on('error',reject);
});
},{concurrency: opts.concurrency || 1});
}, opts.concurrency > 1 ? {concurrency: opts.concurrency || undefined} : undefined);
});
};

Expand Down
2 changes: 1 addition & 1 deletion lib/Open/unzip.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = function unzip(source,offset,_password, directoryVars) {
});

entry.vars.then(function(vars) {
var fileSizeKnown = !(vars.flags & 0x08),
var fileSizeKnown = !(vars.flags & 0x08) || vars.compressedSize > 0,
eof;

var inflater = vars.compressionMethod ? zlib.createInflateRaw() : Stream.PassThrough();
Expand Down
2 changes: 1 addition & 1 deletion lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Parse.prototype._readFile = function () {
extra: extra
});

var fileSizeKnown = !(vars.flags & 0x08),
var fileSizeKnown = !(vars.flags & 0x08) || vars.compressedSize > 0,
eof;

entry.__autodraining = __autodraining; // expose __autodraining for test purposes
Expand Down

0 comments on commit 955a5e3

Please sign in to comment.