Bug 75644 - rmdir -p path/ fails
Summary: rmdir -p path/ fails
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-10 16:16 UTC by Luciano Rocha
Modified: 2007-04-18 16:47 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-10-22 14:00:29 UTC
Embargoed:


Attachments (Terms of Use)
patch introducing code that strips trailing / in remove_parents() before the loop (345 bytes, patch)
2002-10-10 16:55 UTC, Luciano Rocha
no flags Details | Diff

Description Luciano Rocha 2002-10-10 16:16:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021010

Description of problem:
the command rmdir -p fails when there's a trailing slash '/' in the path.
It succeeds in deleting the last component, but complains as if it didn't exist
and aborts.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.mkdir -p a/b/c
2.rmdir -p a/b/c/
3.ls a/b
	

Actual Results:  c deleted, mkdir complains c doesn't exist, aborts

Expected Results:  c deleted, b deleted, a deleted, no complain :)

Additional info:

Comment 1 Luciano Rocha 2002-10-10 16:55:45 UTC
Created attachment 79805 [details]
patch introducing code that strips trailing / in remove_parents() before the loop

Comment 2 Tim Waugh 2002-10-11 15:39:05 UTC
Thanks.

Comment 3 Tim Waugh 2002-10-22 14:00:17 UTC
Fixed package is 4.1.9-12.


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