Skip to content

Commit

Permalink
Merge pull request #68 from ahgentil/handle-yauzl-error
Browse files Browse the repository at this point in the history
Handle yauzl Zipfile 'error' emit
  • Loading branch information
dbashford committed Dec 4, 2015
2 parents c28ec1f + a40dbdc commit 7d35e16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/extractors/docx.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ var extractText = function( filePath, options, cb ) {
processEnd();
}
});

zipfile.on('error', function (err) {
cb(err);
});
});
};

Expand Down
4 changes: 4 additions & 0 deletions lib/extractors/odt.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ var extractText = function( filePath, options, cb ) {
});
}
});

zipfile.on('error', function (err) {
cb(err);
});
});
};

Expand Down
4 changes: 4 additions & 0 deletions lib/extractors/pptx.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ var extractText = function( filePath, options, cb ) {
});
}
});

zipfile.on('error', function (err) {
cb(err);
});
});
};

Expand Down

0 comments on commit 7d35e16

Please sign in to comment.