Skip to content

Commit

Permalink
Pass error to piped stream in centralDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHreben committed Sep 7, 2019
1 parent 5e57320 commit 646dff0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Open/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ module.exports = function centralDirectory(source, options) {
return source.size()
.then(function(size) {
sourceSize = size;
source.stream(Math.max(0,size-tailSize)).pipe(endDir);

source.stream(Math.max(0,size-tailSize))
.on('error', function (error) { endDir.emit('error', error) })
.pipe(endDir);

return endDir.pull(signature);
})
.then(function() {
Expand Down

0 comments on commit 646dff0

Please sign in to comment.