Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5731 closed bug (fixed)

rm cannot delete directory symlinks with new coreutils

Reported by: augiedoggie Owned by: korli
Priority: normal Milestone: R1
Component: Applications/Command Line Tools Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

It seems as though the new coreutils added in hrev36275 is unable to delete symlinks which point at a directory. I first noticed the problem when trying to use the setgcc command which failed with:

rm: cannot remove `/boot/develop/abi//current': Is a directory
Failed to set GCC x86/gcc4.

The problem can also be seen with:

mkdir dir ; ln -sf dir symdir; rm symdir

using rm fails with 'Is a directory'. using rm -r fails with 'Not a directory'

Change History (3)

comment:1 by mmadia, 9 years ago

Owner: changed from nobody to korli
Status: newassigned

comment:2 by korli, 9 years ago

Resolution: fixed
Status: assignedclosed

Should be fixed in hrev36331. fstatat was reversing the traverse symlink meaning, hence finding out a directory and not a symlink.

comment:3 by augiedoggie, 9 years ago

Nice work! Thanks.

I think this has also fixed an annoying problem when using mercurial with the Haiku repository.

Note: See TracTickets for help on using tickets.