Skip to content

Commit

Permalink
Merge pull request #151 from DanielHreben/master
Browse files Browse the repository at this point in the history
Pass error to piped stream in centralDirectory
  • Loading branch information
ZJONSSON authored Sep 8, 2019
2 parents 5e57320 + 646dff0 commit cf47b10
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 cf47b10

Please sign in to comment.