Q what "direction" (of sync) does .stignore filter?

I would like to understand Syncthing and .stignore better. Maybe the following is obvious, but sometime I don’t see the woods because of the trees. Call me a n00b.

Setup: A and B sync with each other. A and B have the same .stignore file with one entry: foo/

Question: When A and B talk to each other,

  1. is A pretending not to know about the contents of foo/ to B because of the .stignore on A? or
  2. does A tell B is has foo and contents of foo but B is ignoring the contents because of its own .stignore on B?

Thanks in advance for any insight. Yes, I’ve read the documentation but am still unsure.

1 Like

In the past it was 1). A would ignore foo/ and more or less pretend it doesn’t exist on disk.

But I think, this changed a while back, so it maybe doesn’t pretend that anymore. But ignores are definitely local. A will not (really) tell B that it has foo/ and if B doesn’t ignore it and B says he has it, A won’t request it, so they are out of sync.

1 Like

Great answer! Thank you. That means that I can “shield” files residing on A from B ever knowing about them. Each file system has its quirks and some files just don’t sync well to another filesystem/os/whatever.

May I add another question? Would A add files in foo/ to the “global state” number of files? Say there are 10 files in foo/ and no files nowhere else. Would the global state in the GUI tell 10 files and 1 folder, or just 1 folder? Or asked the other way round: Would B know that there are 10 files if it had no .stignore for foo/ itself?

[I am meeting my limits of this language here. I hope the details are clear enough.]

I don’t know if this is still true, but afaik If A ignores it, it won’t add it to it’s local or global state, so if your Syncthing folder only has the folder foo with 10 files inside and foo is ignored on A, local and global state will be 0 files, 0 folders.

2 Likes

Thanks!

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