With the release of 2.0 it has introduced a slight problem with how we have used Syncthing for our application.
The application scans a folder for files ending with the extension .cfg and detects new cfg files in a folder that are generated and automatically processes them.
***From the 2.0 release notes.
“The handling of conflict resolution involving deleted files has changed. A
delete can now be the winning outcome of conflict resolution, resulting in
the deleted file being moved to a conflict copy.”
With the new conflict resolution method when a file is deleted (and deletion should be the correct condition for our situation) the conflict resolution now is to create a renamed file with the same .cfg extension.
This is causing the application to automatically read and process this new cfg file, however it should of been deleted.
Is there any possible way to either change the default extension of deleted conflicted files, or change it back to the previous way it was handled.
Thanks for the suggestion, I did try and filter out with exclusions for filenames, but that specific option did not seem to work. I guess it would be because the file is being created by Syncthing on a Deletion Conflict.
There is also a chance I did it incorrectly, but I could not get the filter to work.
If the application does not allow to filter filenames for a pattern then the following may work without modifying the syncthing configuration / conflict behavior:
Pause the folder in question via syncthing API before your app wants to process files
Execute this on the cfg folder to remove the unwanted files before processing them:
find /path_to_cfg_folder -type f -name ‘*sync-conflict*’ -delete
Do your app run / process the remaining files
Unpause the folder via syncthing API to allow new data to come in