whoozle / android-file-transfer-linux

Android File Transfer for Linux (and macOS!)
http://whoozle.github.io/android-file-transfer-linux/
GNU Lesser General Public License v2.1
1.47k stars 120 forks source link

rmdir deletes non-empty directories recursively #329

Closed cunlem closed 11 months ago

cunlem commented 1 year ago

When device is mounted as FUSE filesystem rmdir command deletes entire directory hierarchies while it should only remove empty ones.

Same issue as with https://github.com/hanwen/go-mtpfs/issues/103

Version: 4.2-1 (Ubuntu 22.04)

whoozle commented 1 year ago

It's default MTP behaviour :grimacing: Although we should stick to unix way, thanks!

mnalis commented 11 months ago

Agreed, attempting to rmdir(2) directory which is non-empty should fail with ENOTEMPTY