Strange behaviour when trying to add ".*" as exclude pattern


#1

My sync heavily relies on ignore patterns and followed the advice of pointing my .stignore to a .stglobalignore file. So far everything worked fine until I tried to exclude all hidden files by adding “(?d.*)” excluding my global ignore file at the end of my global ignore file. Suddenly Syncthing tries to traverse directories that were previously ignored.

For example I have the following ruleset (the complete file attached):

#snapshot

!/.stglobalignore
(?d).*

Now Syncthing tries to traverse “#snapshot”. I don’t understand it because I thought the order mattered and the first matching rule wins.

error while traversing /volume1/Grafik/#snapshot/GMT+01-2019.01.10-19.01.03/@eaDir/SYNO@.fileindexdb: permission denied

If I delete “!/.stglobalignore” everything works as expected but then my global ignore won’t get synced. Is this expected behaviour?

.stglobalignore (805 Bytes)


(Jakob Borg) #2

Ignore patterns are not regexps. “.*” means to ignore files and directories with names starting with a period. “#snapshot” does not begin with a period.


(Simon) #3

The error you are seeing is coming for the “watching for changes” feature which does not take ignores into account when setting up watches if there are any include patterns (!...). Events are still filtered by ignore patterns when they happen. I am afraid the only workaround is to either disable that feature or not use include patterns.


#4

@calmh Maybe I did not explain myself well but luckily @imsodin understood and gave me the explanation.

You can mark this as solved.


#5

Why can I not mark the correct answer as solving this?


(system) closed #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.