Red Hat Bugzilla – Bug 74012
tar strips trailing slash from / and calls mkdir with empty path
Last modified: 2007-11-30 17:06:55 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020802
Description of problem:
When doing a full system archive and extraction, tar creates an entry in the
archive for the / directory, but then strips the trailing slash on restore and
tries to call mkdir with an empty path.
This results in error output from tar even though the archive is extracted
If the -P option is not passed to tar when creating the archive, the first entry
of the file has an empty path.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. tar zcpPf /backupdir/backup.tgz --exclude /dev --exclude /proc --exclude
2. tar zxpPf /backupdir/backup.tgz -C /
Actual Results: Tar strips the slash from the "/" entry and then calls mkdir
with an empty path which results in the following error messages--
tar: : Cannot mkdir: No such file or directory
tar: Error exit delayed from previous errors
Expected Results: Shouldn't have produced any error messages.