syncthing-android
syncthing-android copied to clipboard
Folder names and IDs that only differ in cases may refer to the same folder
what happened:
I have a folder with label 'camera', which is stored at '/storage/emulated/0/camera'; Then from other devices, I synchronize another folder with name 'Camera', which is stored at '/storage/emulated/0/Camera' by default; Unexpectedly, the two folders refer to the same folder in storage and their files are all mixed together; Moreover, if in two folders there are files with same names, or with names only differ in cases, the folders will be 'out of sync', and cannot be resumed even if I delete the conflict files; And if I delete one of the two folders, another will show that it is missing and finally 'stopped' .
what I expected to happen instead:
To my own knowledge, in Android storage folder names are case-insensitive. I think it is difficult to keep '/storage/emulated/0/camera' and '/storage/emulated/0/Camera' as two different storage. However, I think, it is possible to give a warning.
Version Information
App Version: 1.3.
Syncthing Version: v1.3.1
Android Version: Android 4.4
I am a bit lost, you say that it's not possible to have two folders with different casung, so what would the warning say?
I guess currently we do have a warning at least in the web GUI when you add a folder on a path that already is a folder, or a subpath. That check is probably case sensitive, though.
How would it be implemented? Presumably using stat, which follows the case sensitivity of the platform.
I expect just a tolower on the paths when doing a comparison should suffice?
I guess what I am saying is that I am not sure if its a problem. I suspect the warning just does not propagate in android, and just stays visible on the web ui.