Why default modTimeWindowS to 2 for FAT only on Android?

There is already a mechanism that deals with any filesystem that does not have nano-second precision: The mtimeFS. Meaning that covers the 2s precision of FAT. That mechanism requires though, that the filesystem is consistent: If it told Syncthing at some point that the mod. time of a file is 01:30:03, when asked again it should say 01:30:03 as well - not 01:30:02. And that’s what a “normal” FAT filesystem does. Android on the other hand puts some virtual filesystem shenanigans on top of FAT, and apparently that changes reported mod. times upon restart (well remount probably). And that’s the problem and that’s why the mod. time window workaround is necessary despite having the mtimeFS.

1 Like