tar: untaring with --recursive-unlink ends with an empty directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tar (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Using tar version 1.26-4ubuntu1 from Ubuntu 12.04 (I'm submitting this case here, as I can't tell if it's specific to the tar shipped with Ubuntu or a bug with all tar, and this concerns Ubuntu base packages anyway).
Using the attached archive file, running this:
/bin/tar --extract --auto-compress --exclude-backups --exclude-caches --exclude-vcs --preserve-
… I get an empty directory, although the output says it extracted many things.
This seems to be related to a buggy `--recursive-
/bin/tar --extract --auto-compress --exclude-backups --exclude-caches --exclude-vcs --preserve-
… the directory is not empty any‑more.
I get this unexpected behaviour with this archive only, not with others.
My guess is that it's due to the order in which the entries appears in the tar file. Indeed, the Sphinx top level directory is listed last, and its content before it, so tar extract its content then delete all the directory to recreate the directory, emptied.
I can't believe this is the expected behaviour.
In case someone is interested in this bug, what I remember I noticed later, is that `tar` extract a directory, then delete it, then try to add files in the just deleted directory (which turns to be wrong, obviously), then sometime recreate the directory, which ends to be empty.
Someone should care, as `tar` is a core functionality.