zhanghai / MaterialFiles

Material Design file manager for Android
https://play.google.com/store/apps/details?id=me.zhanghai.android.files
GNU General Public License v3.0
5.75k stars 384 forks source link

File Renaming Does Not Work When Changing Case Of Existing Characters Of The Filename? #1208

Open mosource21 opened 4 months ago

mosource21 commented 4 months ago

This problem obviously makes things difficult when trying to rename files/folders. This functionality is essential if the underlying file system is case sensitive but even is the file system isn't case sensitive you may still want to rename a file for display/reading purposes.

Reproduce: From within Material Files create a file called "test.txt". Then try to rename to "Test.txt" and the rename is not carried out (note the difference of lower and upper case "T").

Workaround: Rename the file to "TTest.txt" and then to "Test.txt" (adding an extra character and then removing it forces the rename to happen).

Solution: Guessing here but the check to detect if the rename should be performed should be changed to case sensitive?

SomeTroglodyte commented 4 months ago

Betting that's a FAT or other case-insensitive filesystem, so not a MaterialFiles issue, but a general one. Happens on other Linuxes too.

mosource21 commented 4 months ago

It appears the rename works fine when browsing the root filesystem (so as you say Material Files must be working correctly) but the internal storage or a samba share to an ext4 (thought this was case sensitive though) file system is not working. It is not just file renaming if you try to create a folder with the same name as an existing folder but with different case it thinks the folder already exists. Must be something specific to the type of underlying file system or how samba is setup perhaps. Never noticed it before now though.

devycarol commented 3 months ago

Corroborating this.

Feuerswut commented 2 months ago

Base Linux is case-sensitive, Android is not, (I think).