Atomic acess of ignore list

Hello, I am currently developing a python script operating on ignorelists.

The Script generates a list of files to be ignore and writes the list via Rest API.

The Problem: In some cases (especially when data has changed the list is only written partially.

I suspect that this odd behaviour is due to internal states changing/ongoing synchronisation. I haven’t found any info on this in the docs.

The question: Is there anything to consider before writing the ignore list? Do i have to check if syncthing is ready?

Is it possible to write the ignore list locally via the OS without confusing syncthing?

What you’re describing shouldn’t happen, I’d be interested in an example or reproducer. You can also just manage the file on disk as you please, yes.

Thanks for your reply.

It is hard to reproduce such a case because I would need an automated framework, which sets up multiple machines/instances of syncthing to a predefined state. If I am able to reproduce it I will leave an update.

I’ll experiment further and try writing directly to the .stignore file.

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