rm -r removes directory but reports "cannot remove 'dir', directory not empty"
Saurabh T
saurabh@hotmail.com
Fri Sep 10 19:22:00 GMT 2010
This is with the latest cygwin and coreutils 8.5-2.
Good:
> mkdir 1; echo $?
0
> rm -fr 1; echo $?
0
> ls 1
ls: cannot access 1: No such file or directory
Bad:
> mkdir 1; echo $?
0
> rm -fr 1; echo $?
rm: cannot remove '1': Directory not empty
1
> ls 1
ls: cannot access 1: No such file or directory
I have attached relevant strace output for the above two rm calls.
The differences seem to start at the "try_to_bin: Move" in the bad output.
Note that rmdir works fine in both cases when the directory is empty.
saurabh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strace-rm-good.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100910/6cc9742e/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strace-rm-bad.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100910/6cc9742e/attachment-0001.txt>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list