Bug 75644 - rmdir -p path/ fails
rmdir -p path/ fails
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2002-10-10 12:16 EDT by Luciano Rocha
Modified: 2007-04-18 12:47 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-10-22 10:00:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Luciano Rocha 2002-10-10 12:16:34 EDT
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:

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 12:55:45 EDT
Created attachment 79805 [details]
patch introducing code that strips trailing / in remove_parents() before the loop
Comment 2 Tim Waugh 2002-10-11 11:39:05 EDT
Comment 3 Tim Waugh 2002-10-22 10:00:17 EDT
Fixed package is 4.1.9-12.

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