I installed syncthing with homebrew on OSX 10.14 and have it running as a service. Everything works fine except for changes to files are not detected until a full rescan occurs.
It is pretty much the same issue as described here: Mac FS Watcher
I can see that the aggregator starts when I run st with STTRACE=watchaggregator,scanner, but upon changing a file nothing happens.
I tried reinstalling syncthing, but the issue persists. The file watcher seems to work fine on the Android app.
Is it enabled? Does Syncthing complain about it not being able to watch for changes? Does it work with our release binaries from Github instead of homebrew?
It’s enabled and I don’t see any complaints in the logs, just this message: ‘DEBUG: aggregator/“Notes” (6scsh-x95pt): No tracked events, waiting for new event.’
I tried the latest binary from the GitHub releases and get the same behavior.
Okay. File watcher works for me on macOS, with our binaries, so I think we’ll need more info. Config or screenshots, what sort of filesystem maybe, things like that.
I think I’ve found the issue. The folder was called ‘notes’ on the file system, but syncthing was looking for ‘Notes’. That should probably be case-insensitive, but renaming the folder to ‘Notes’ makes the file watcher work.
The problem here is OS X filesystem is only partly case-sensitive, while there are truly case-sensitive filesystems where this Syncthing behaviour makes perfect sense. Since Syncthing is generally aiming to support as wide a range of OSes as possible, this is the way it goes as of now. Adding a check to make sure the filesystem in question is half-case-sensitive (as opposed to totally-case-insensitive FAT or NTFS and case-sensitive EXT or ZFS) is not trivial and quite some work (if at all possible).
That makes sense. It is odd that a manual rescan works fine, but just the file watcher doesn’t work. I guess maybe the scanner uses a different method of finding the folder.
Yeah… I think the issue here is that Syncthing is watching /Users/foo/Notes/... but then gets told about a change in /Users/foo/notes/... which it doesn’t see as being under the watched path. We resolve this at least on Windows by figuring out the actual filesystem name for the folder, but maybe that doesn’t work on macOS.