There are some things which are not immediately clear to me about using stignore.
First of all, would it be correct to say that, stignore ONLY ignores incoming updates for the files and folders its rules match? If true I find this to be an important aspect of stignore behavior which is somewhat understated in the documentation.
Node A, B and C are syncing a file named “X” and it is fully synced between all 3 nodes. I have control over C since it is my laptop and I would like to delete file “X”. Node A and B should just continue syncing file “X” between each other. It seems to me that this scenario cannot be achieved. In this case, I should’ve added the stignore rule to ignore file “X” to node C prior to starting to sync with A and B.
Is there a way in the latest Syncthing to delete already synced data and thereby not impact the sync behavior between the other nodes?
Node A and B are syncing a file named “X” and it is fully synced between both nodes.
Node A has a stignore rule to ignore file “X”. Node B deletes file “X”. On node A file “X” remains untouched as expected. Why is file “X” not synced back to node B because node B is not ignoring it. What is preventing this? And what can be done to have that file synced again?
Ignores are used in two ways.
On the scanning side it will simply skip the files as if they do not exist, hence nothing will be sent, on the receiving side it will skip downloading content of the ignored files, yet the knowledge of the file will be stored.
So no, in case of #1, you ignire the file and then delete it, which means it won’t see the deletion.
In #2, the file is not synced back as it technically does not exist (due to ignores)
This is good to know. It would be useful to add to the docs as it clarifies the expectations one might have about stignore behavior.
I am fairly confident that this it NOT the case.
When node A and B both have file “X”. A stignore entry to ignore file “X” is added to B after file “X” was synced from node A then deleting file “X” from node B will also delete it from node A.
So it seems this is unexpected behavior.
Version 0.14.4 changed the way ignores are handled.
If you did not ignore the files at first, they got added to the index. You then deleted them but they stayed in the index as they were ignored. Before 0.14.4 this didn’t matter, but now it does.
We are working on a solution for future version.