Closed sergv closed 6 years ago
There's currently a major PR in progress. Can you check if the problem is already addressed by https://github.com/snoyberg/tar-conduit/pull/11? I believe it totally overhauled the headerFilePath
bit.
Ignore my previous comment, @lehins mentioned this PR to me, and said he would include the fix in his PR.
I think we can close this PR then. But I hope a test for this issue will be added to #11 since this kind of tar file seems to be rather rare. I'll move remaining optimization commit to another PR.
OK, closing. I've just merged the other PR to master, so if you'd like to rebase the optimizations onto it, now's a good time. Sorry for the confusion, long-lived PRs do this sometimes.
I believe that
headerFilePath
function is currently implemented incorrectly. That is, it should not just concatenate prefix with suffix, but rather it should combine them via/
, according to https://github.com/Keruspe/tar-parser.rs/blob/master/tar.specs#L187.Sure, that may be a random spec on the internet but here's a test case that works OK with GNU tar but not-so-OK with simple program using
tar-conduit
. Take the https://hackage.haskell.org/package/cabal-debian-4.24.8/cabal-debian-4.24.8.tar.gz archive and compile the following program:Its output (notice the contents of
test-data
folder):However, with
tar
everything's good:On a completely unrelated matter, I also noticed that header parsing code could be improved. Please voice your concerns if you believe it should go into separate PR.