Bug 74012

Summary: tar strips trailing slash from / and calls mkdir with empty path
Product: Red Hat Enterprise Linux 3 Reporter: Jesse Michael <jdm>
Component: tarAssignee: Peter Vrabec <pvrabec>
Status: CLOSED WONTFIX QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-02 10:24:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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: