This post is based on the following (currently closed) ticket in the bug tracker: https://github.com/syncthing/syncthing/issues/3766
I am using syncthing 0.14.12 on Windows 7 x64.
Assume I am syncing a folder with the following subdirectory structure:
Each subfolder contains one file named as subfolder.txt (i.e., \aa\aa.txt). In total, I have 7 folders and 7 files. I am using the following .stignore pattern:
I expect to be syncing two files:
I added the directory to syncthing and the scanning proocedure resulted in only one subdir one file in the local state. Only \bb\bb.txt was synced.
I’ve tried different patterns to include \cc\yy\yy.txt in sync with no success. In the end I noticed the following effect. I temporarily added one line to .stignore and rescanned the folder:
The local state showed 5 files and 5 folders as expected. Then I reverted back to the original .stignore and rescanned again. The local state displayed 2 files and 2 folders and both files were synced (as I originally wanted). However, a newly added file \cc\yy\yyy.txt still won’t show up in the local state and won’t be synced. If I delete yy.txt and rescan, it disappears from the local view and is deleted on the other side. If I recreate it, it is not synced.
- Is this behavior expected?
- If yes, is it possible to write a proper .stignore to sync all files in \cc\yy subfolder?