Closed ff6347 closed 4 years ago
Hmm, why would that be needed? Not sure I follow
Ill try to write a demo repo which shows my issue why I think this is needed
Hi. I made the demo repo under https://github.com/fabianmoronzirfas/tar-stream-pr-104-issue-demo
The problem I had was the following:
When extracting a folder of tar.gz files the module hung itself on the next element when I did not call.
// …
return estream.resume();
// …
Be aware that this error might be related to my noobness on tar and streams or also the complexity of the project where I used this.
Currently I get a different error related to #68 ?
events.js:173
throw er; // Unhandled 'error' event
^
Error: Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?
at Object.exports.decode (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/headers.js:266:43)
at Extract.onheader (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:123:39)
at Extract._write (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:249:8)
at Extract._continue (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:212:28)
at oncontinue (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:67:10)
at Extract.ondrain (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:87:5)
at Extract._write (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:249:8)
at Extract._continue (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:212:28)
at oncontinue (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:67:10)
at onunlock (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:73:24)
Emitted 'error' event at:
at Extract.onerror (path/to/project/tar-stream-pr-104-issue-demo/node_modules/duplexify/node_modules/readable-stream/lib/_stream_readable.js:640:52)
at Extract.emit (events.js:202:15)
at Extract.onheader (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:125:12)
at Extract._write (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:249:8)
[... lines matching original stack trace ...]
at oncontinue (path/to/project/tar-stream-pr-104-issue-demo/node_modules/tar-stream/extract.js:67:10)
Shouldn't the extract function
return stream.resume()
?