This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

rm -r removes directory but reports "cannot remove 'dir', directory not empty"


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
 		 	   		  

Attachment: strace-rm-good.txt
Description: Text document

Attachment: strace-rm-bad.txt
Description: Text document

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]