-
Notifications
You must be signed in to change notification settings - Fork 3
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
7-Zip and PeaZip can't open tar files created by DART #229
Comments
You can open DART tar files on Windows using Windows built-in tar command. See https://www.addictivetips.com/windows-tips/use-tar-on-windows-10/ for details on how to use it. Microsoft's release of tar is described here. Their version uses libarchive under the hood, which does support PAX headers |
Closing: This is a bug in 7-Zip, not in DART. |
Bug raised with https://sourceforge.net/p/sevenzip/bugs/2396/ |
Hi Andrew, there does appear to be an issue with the TAR files created by DART.
I made a tar with 7-zip and also the tarfile module in python and it has the required zeroes at the end. DART tars have only 82 bytes of zeroes at the end from my limited hex viewing. Edit: 7-zip has improved TAR support in general in the last few years. previous versions only extracted folders and no files, and there were PAXHEADER warnings. Newer versions extract files from DART TAR files just fine, they just have that warning at the end. |
Good to know. The issue likely comes from the underlying JavaScript tar-stream library. I'm in the process of rewriting DART, so I hope this will be fixed in future versions. |
I made a >4 gig file with https://github.com/mafintosh/tar-fs which uses tar-stream (same developer) and it has the correct number of zeroes at the end. Good to know that this is on the list anyhow. SHould this be re-opened or will I make a new issue as I think it's now a different situation to the original post in this issue? |
I'll reopen it. |
I'm not sure on what side (DART or 7-Zip) or when the change happened but I've been having no problems opening DART-created .tar files with 7-Zip for a while now. I'm using DART 2.022 and 7-Zip 22.01 dated 2022-07-15 |
I'm working on a new version of DART. It won't be available for a few months, but I will test DART tar files with 7-zip in the new version. |
Not quite sure how to interpret your response, |
Are you not getting the 'Unexpected end of archive' message with 7-zip? 7-ZIP also successfully extracts TAR packages for me but I get that warning due to the insufficient number of zeros at the end of the TAR file. |
@kieranjol I do not. Both testing and extracting TARs created using the versions of DART and 7-Zip I mentioned above work fine with no warnings or errors. This was curious to me and after a bit of testing, I think there are two peculiarities going on. The first is a 7-Zip issue, the second is DART-related. 1. Difference between 7-Zip GUI and 7-Zip command line 2. Difference in TARs generated by DART and dart-runner |
Thanks for this detailed breakdown.
Can you share an example tar from dart-runner? |
Sure thing. Here it is |
Sorry I haven't been tuned in to this tread. I'm on vacation. DART is written in JavaScript and uses the tar-stream library to write tar files. DART Runner is written in Go and uses the archive/tar library, which is part of the core of the Go language. It doesn't surprise me that one produces incorrect output while the other is correct. I've found many JavaScript libraries to be unreliable. I'm in the process of writing DART 3.0 right now, ditching JavaScript in favor of Go. The JavaScript-Node-Electron platform on which DART is build has been exceedingly hard to maintain and extend. The goal of the rewrite is to provide a more stable, reliable, maintainable and extensible platform. So the short answer to this issue is that it almost certainly won't be fixed in the DART 2.x line. It will be fixed in DART 3.0. I hope to have a beta release of 3.0 later this year. |
Thanks for all this, it's been helpful for me to get to the bottom of this as well. 3.0 fix sounds like it makes the most sense. Looking forward to testing it out. |
I'm recording this as an informational issue. The bug is actually in 7-Zip, which PeaZip uses under the hood, as shown in the attached screen shot. 7-Zip's inability to parse PAX headers is an open issue at https://sourceforge.net/p/sevenzip/bugs/2116/
Note that DART uses PAX headers because the old ustar headers could describe files only up to 4GB in size. PAX headers let us include files >4GB in the archive.
The image below show's PeaZip's detailed error. Before you see this, PeaZip shows a message saying it thinks the archive is encrypted, and it asks for a password. This is incorrect. DART does not create password-protected tar files.
The text was updated successfully, but these errors were encountered: