Conversation
Removes trailing space
|
To even consider this, I would need a test case that fails without the patch, and passes with it. At the absolute least, give me steps to reproduce whatever problem it is that you're encountering. This library is used extremely widely by many many node users, as it's the tar library that npm uses. I can't change something so subtle and deep in its behavior without extremely thorough examination of the side effects and very strong justification. Its current behavior matches bsdtar, and in my experience so far, I've never seen any problems unpacking node-tar's archives using any version of gnutar made in the last 10 years or more. I'm not trying to be difficult, but you have no idea how much difficulty it would cause to be overly casual about stuff like this. |
|
Hello, Unfortunately, in my case it's going to be extremely difficult to provide a strong justification for solving the problem. I asked for it to be added because I'm not the only one (see ticket #28) and with the modification the archive is in the same form as what can be obtained with GNU tar or even 7-zip. And I agree with you, I don't have any problems with archives on a system other than the Hilscher web server either.
According to my research, in a tar archive, digits are encoded in octal and terminated by a NULL or sometimes a space (https://mort.coffee/home/tar/). Your implementation adds both. Which is perhaps a good and smart way of being ultra-compatible. I understand that this package is a brick on which the entire node ecosystem depends, and I understand if you prefer not to change anything. In any case, thanks for your work. |
|
I'd accept a patch to make the null/space padding configurable. Closing this, though, because changing it in the proposed manner is too risky. |
Hello,
I had compatibility problems with tar files generated by the node-tar library.

In my case the archives were sent on proprietary embedded hardware, so it's quite specific.
On the other hand, the same archive generated with 7-zip or GNU tar worked perfectly. After observing the differences in the archives generated, it turned out that the significant difference was the way the numbers were encoded in the header.
This point has already been covered in ticket #28.
My pull request corrects my specific problem and outputs archives encoded in the manner of 7-zip and GNU tar.
Hope this can help