Hi there, thanks for this great package.
I have an issue where I'm using tar-fs, and by extension, tar-stream
The issue I have is an edge case, where if an end user forgets to add -o filename to the end of the curl command, it crashes my node app, and I'm unable to catch the error. (I'm using express and streaming a response)
It stems from this:
entry (header, buffer, callback) {
if (this._finalized || this.destroying) throw new Error('already finalized or destroyed')
and in tar-fs it doesn't catch the error. As this is asynchronous, when I try catch the error, it hasn't happened yet.
if (stat.isDirectory()) {
header.size = 0
header.type = 'directory'
header = map(header) || header
return pack.entry(header, onnextentry)
}
How can I fix this? Thanks.
Hi there, thanks for this great package.
I have an issue where I'm using
tar-fs, and by extension,tar-streamThe issue I have is an edge case, where if an end user forgets to add -o filename to the end of the curl command, it crashes my node app, and I'm unable to catch the error. (I'm using express and streaming a response)
It stems from this:
and in
tar-fsit doesn't catch the error. As this is asynchronous, when I try catch the error, it hasn't happened yet.How can I fix this? Thanks.