Skip to content

Commit

Permalink
fix: antelle#103 catch error in write stream
Browse files Browse the repository at this point in the history
  • Loading branch information
WanGe2000 committed Sep 7, 2023
1 parent 7c5d503 commit 815dfec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions node_stream_zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ const StreamZip = function (config) {
return;
}
fsStm = fs.createWriteStream(outPath, { fd: fdFile });
fsStm.on('error',(err)=>{
callback(err);
})
fsStm.on('finish', () => {
that.emit('extract', entry, outPath);
if (!errThrown) {
Expand Down

0 comments on commit 815dfec

Please sign in to comment.