I get Filesystem Watcher Errors for a directory that is ignored:
For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can’t. Support
data error while traversing /home/janekf/data/1-projects/aur/stretchly-xeruf-git/pkg: permission denied
With the browse API endpoint, I was able to successfully confirm that stretchly-xeruf-git is included, but this subdirectory is ignored (with the ?d flag) as it should be. So why is syncthing trying to watch it?
This is expected: If you use include pattern the entire tree needs to be watched and the patterns are applied to the results. That’s because any directory might still have children that aren’t and any errors encountered by the watcher library fail the entire operation.
I don’t think there is a way to ignore all directories (themselves and their contents) while including files with the current ignore spec.
That is rather unfortunate.
EDIT: Wait, but that does not concern the ‘pkg’ directory - the way it is excluded it should be out completely, with no subpaths being searched for whatsoever.
As soon as you say !anything the entire folder will be watched. Syncthing is not smart enough to try to draw some conclusion about what precisely could be marched by the !-expression.