Completely prevent syncthing from traversing a directory subtree

The problem is with the “watching for changes” feature and include (!) patterns, specifically this one:

!/.config/gcloud

In order to find all included paths, Syncthing still traverse the entire file tree, even if a parent is ignored. Otherwise /.config would be ignored and /.config/gcloud missed. The only exception to this rule are “toplevel includes”, i.e starting with a path separator and not containing any path separators or double asterisks.
Now for our own scanning periodic logic, we can ignore errors on ignored directories, however in the filesystem watching library we use any error is fatal.

Your options are to either find patterns/directory structures that only need top-level include directories or you disable watching for changes (periodic scans will still traverse your entire .local dir then).

2 Likes