rmdir of non empty dir causes wrong errno with SMB or NFS fs
Aurélien Couderc
aurelien.couderc2002@gmail.com
Sat Jul 12 13:02:39 GMT 2025
Cygwin 3.7.0-0.219.gbf81e32f29e0.x86_64, /bin/rmdir causes wrong errno
if the filesystem is SMB or NFS.
Test case:
bash -c 'rm -Rf d1 ; mkdir d1 ; touch d1/f1 ; rmdir d1'
On C; I get:
rmdir: failed to remove 'd1': Directory not empty
On N: (Windows NFS) I get:
rmdir: failed to remove 'd1': Bad address
if I trace this I get:
bash -c 'rm -Rf d1 ; mkdir d1 ; touch d1/f1 ; strace -o
/tmp/rmdirtracelog.txt rmdir d1'
rmdir: failed to remove 'd1': Permission denied
Both "Bad address" and "Permission denied" are IMO wrong, the expected
error would be "Directory not empty".
Aurélien
--
Aurélien Couderc <aurelien.couderc2002@gmail.com>
Big Data/Data mining expert, chess enthusiast
More information about the Cygwin
mailing list