I've tried the following (and this is repeatable on multiple devices, with different Android versions, e.g. LineageOS 15.1 on Samsung Tablet vs. Android 8.1.0 on BQ Phone):
simple-mtpfs dirA
mkdir -p dirA/testdir
mkdir dirB
echo Android > dirA/testdirA/test.txt
echo PC > dirB/testdirB/test.txt
first sync -> unison shows a conflict, decide in favour of the PC, sync, all looks well
2nd sync -> unison states:
test.txt
Error: Two or more files on a case-sensitive system have names identical except for case. They cannot be synchronized to a case-insensitive file system. (File 'test.txt')
simple-tmpfs seems to keep some kind of (wrong) cache across re-mounting a file system
Perhaps there is a smart combination of options that would make it work, but there are so many of them that at least a hint which one(s) could be helpful would be really nice.
After a reboot of the PC, the issue is gone, so it sounds really like a caching issue. I tried again with direct_io but the result was the same (debug log:
mtpfs_debug.txt
I've tried the following (and this is repeatable on multiple devices, with different Android versions, e.g. LineageOS 15.1 on Samsung Tablet vs. Android 8.1.0 on BQ Phone):
then setup unison to sync testdirA with testdirB.
(notice the size of 3 for both files)
(the file
.unison.test...
definitely isn't seen on Android)While doing the last 3 commands (1x ls + 2 x cat) shows in debug mode the following:
In my opinion, there are potentially 2 errors:
Perhaps there is a smart combination of options that would make it work, but there are so many of them that at least a hint which one(s) could be helpful would be really nice.