No files mounted when tar uses relative paths
See original GitHub issueAll the files appear to have been mounted within an unreachable ‘.’ folder, with the index file listing the them as being at locations like /./.config
.
The tar.gz
was generated on osx with a relative path given as well as a list of folders to exclude.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
tar with relative paths - Unix & Linux Stack Exchange
This archives (compresses) all the given files without absolute paths. It appears that with the dot ( . ) works well. Don't know...
Read more >Relative paths for -f are broken, and --project-directory ...
Your error message indicates, that the file you are trying to untar is actually not a tar.gz file despite its name. This can...
Read more >use a relative path in requirements.txt to install a tar.gz file with ...
This path is not relative to the requirements.txt file, but rather to the current working directory. Therefore it is necessary to navigate ...
Read more >[SOLVED] tar absolute and relative path - LinuxQuestions.org
i use absolute path to make a backup tar cvf backup /home/user and when i try to restore backup it doesn't destroy my...
Read more >Linux / UNIX: tar Command Stay In Local / File System When ...
How do I force tar to use a single file system under Linux / UNIX / BSD ... the tar command not to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks!
I’d managed to get a hacky workaround but will retry with your patch.
The
--recreate-index
flag will come in handy and reminds me I was hoping for a “don’t recursively untar” option since this was a backup of my home directory including random tar files.The fix I used was:
The example.tar.gz is compressed. This is currently not supported. I added a warning message and avoided mounting an empty directory in case a compressed archive is specified. I was looking into combining ratarmount with lzopfs in order to add support for compressed archives but currently I don’t have the incentive as I don’t need it.
The problem with your TAR in comparison to my self created TARs with leading
./
is that it contains./
. I.e., output fortar tvf
for my test TAR:your test TAR:
The problematic entry being the topmost one. It seems such a TAR can be created with:
Could you test the latest commit?