Ignores not working

I have these ignores [excerpt] (via include of a shared global-ignores file on all devices):

(?d)*.tmp
(?d)[~]*.tmp

// Temporary / Backup Files
(?d)*[~]
.*.swp
(?d)[~][$]*
(?d)~$*

But still syncthing attempts to sync these files (shown in the “not synced” view of one remote device):

  • ~WRL1350.tmp
  • bugzilla37035-safeToDelete.tmp
  • ~WRL2060.tmp
  • ~WRL0003.tmp
  • 444A.tmp
  • ~$Zeitaufschreibung.xlsx

Am i doing something wrong? Or is this a bug?

Also i believe that the ~ (tilde) symbol has special meaning (or is not treated as literal) in the ignore files.

I attempted to escape it by using [~]. Is this correct?

Tilde is not special meaning in this context (for folder root paths it signifies home), but square brackets do - check https://docs.syncthing.net/users/ignoring.html. Essentially in your example above just drop the square brackets.

Ok thanks for the info, but i still have problems with this.

I wrote this ignore file a long time ago. I suppose i read the docs back then and saw the part about the brackets […] and thus tried to use it for escaping. (I am familiar with regex.)

So how come these files are not beeing ignored?

I just noticed, the tmp file beeing shown to transfer is probably the diff here:

|Global State | 5.521   310   ~3,79 GiB|
| Local State | 5.520   310   ~3,79 GiB|

So could it be it is ignored on this machine, but not on some other machine and thus this machine shows it as “need to send” to aother machine?

Syncthing’s ignore system is not regex, it’s close to standard linux wildcards/globbing (but also not exactly).

Actually while the brackets do have special meaning they should simply have no effect in your example, so removing them shouldn’t change anything - sorry about that. Some of your patterns are redundant (e.g. first two) and I assume with [~][$] you wanted to match either ~ or $, in which case that should be[~$].

Quite a few things in here: 1. Assuming you use a recent Syncthing version, it doesn’t matter whether ignore patterns differ between devices, it should always get in sync. 2. There’s no such thing as “need to send”, the remote out of sync item list shows files the remote yet needs to sync. In general think of Syncthing as every device pulling the data it needs. 3. Yes, that diff signifies there is one device that has this file and doesn’t ignore it.

Suggestion: Check and fixup your ignore patterns on all devices.

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