Bug 74012 - tar strips trailing slash from / and calls mkdir with empty path
Summary: tar strips trailing slash from / and calls mkdir with empty path
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: tar
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-13 18:53 UTC by Jesse Michael
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-02 10:24:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jesse Michael 2002-09-13 18:53:55 UTC
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
successfully.

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):


How reproducible:
Always

Steps to Reproduce:
1. tar zcpPf /backupdir/backup.tgz --exclude /dev --exclude /proc --exclude
/backupdir /
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.

Additional info:


Note You need to log in before you can comment on or make changes to this bug.