Closed Dale-Black closed 1 year ago
And this was a comment from someone who understands this better than me
It's not the path you're passing to Tar.jl, but rather the tar file itself has absolute paths inside of it. E.g. from your error ,
/images/MESASWEEROM_MESA3010171_20010307_153121/
is saying the file should be extracted to root ( / ) in a folder called images. I'm assuming tar just ignores the absolute path and extracts to ./images ? You could open an issue here , maybe Tar.jl should do the same
Here are the logs from using tar -xf
tar: Removing leading '/' from member names
tar: Removing leading '/' from member names
tar: Removing leading '/' from member names
tar: Removing leading '/' from member names
Not sure there's anything to do here. This tarball has absolute paths in it, which Tar.jl refuses to extract since that would be wildly insecure to allow. The tar
command handles this by ignoring the leading /
, which makes very little sense to me... like why is that a reasonable thing to do? ./images
and /images
are not the same thing. So it seems that raising an error is the only reasonable behavior here.
Gotcha, okay thanks for that information.
Not sure I understand this, so I don't know how to adequately describe what's going on, but
tar -xf
works, whereas Tar.jl doesn't. Here is a recent discussion on Slack I postedHow do you use Tar.extract? Seems like this should be easy, but this example code:
Is causing an error:
Currently a simple workaround is: