New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped? #110
Comments
I'm getting this error on certain tar file that unpacks perfectly fine using other tools, any thoughts? (I've zipped it up to attach it here) - The tar's come from a vxWorks platform if that helps? |
@PaulMcGuinness, the issue I got was caused by me modifying tar-stream |
No, not doing any modifications. Using the simple example code. It's definitely tar version related (as newer versions of the same platform's backup work fine) |
So ... I debugged a bit and got the problem - your tar file fails the proper header checks ( look here if you are curious Line 264 in e08fcd8
Solution is to:
I would suggest to go for 1 |
Many thanks for the solutions - I can't change the tar format, and (3) is outside my abilities, so I'll try (2) tomorrow :-) |
Option (2) worked perfectly - Many thanks! :-) |
If you wanna add a note about that to the readme send a PR 😊 |
tar-stream/extract.js
Lines 180 to 181 in b737a8d
If
header.size
is modified for some reason inentry
event handler causes this error. For now quick fix is just to avoid modifying theheader.size
in the event handler but at least it needs to be documented or even better to make and use a copy of the size in local variable.The text was updated successfully, but these errors were encountered: