hanwen / go-mtpfs

Mount MTP devices over FUSE
Other
682 stars 85 forks source link

rmdir on a non-empty directory does "rm -rf" rather than fail with an error #161

Closed juliangilbey closed 2 years ago

juliangilbey commented 2 years ago

Please see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952796 for a little more discussion of this. Running rmdir nonemptydir deletes the whole non-empty directory, which is not the expected UNIX/POSIX behaviour; it should instead exit with an error saying that the directory is not empty.

juliangilbey commented 2 years ago

I just saw that this was addressed in https://github.com/hanwen/go-mtpfs/commit/1e01fd2b9a423ad0ad8fd06a1f3e2d8cf8f23e5a - unfortunately, that was after the 1.0.0 release, so I hadn't picked it up! Sorry for the noise.