Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
Avoid errors with strip option
Browse files Browse the repository at this point in the history
  • Loading branch information
bclinkinbeard committed Jan 13, 2016
1 parent 40bc900 commit 44b6a70
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lib/decompress-zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,16 @@ DecompressZip.prototype.extractFiles = function (files, options, results) {

results = results || [];
var fileIndex = 0;
files.forEach(function (file) {
var promise = self.extractFile(file, options)
.then(function (result) {
self.emit('progress', fileIndex++, files.length);
results.push(result);
});

promises.push(promise);
files.filter(function (file) {
return file;
}).forEach(function (file) {
var promise = self.extractFile(file, options)
.then(function (result) {
self.emit('progress', fileIndex++, files.length);
results.push(result);
});

promises.push(promise);
});

return Q.all(promises)
Expand Down

0 comments on commit 44b6a70

Please sign in to comment.