No you can’t, as this is the only way for us to tell when a directory was unmounted for example, and not assume that everything was deleted.
You can configure syncthing to look for some other file to distinguish that, but this would have to be configured on each and every client. This is available in advanced config section for the folder.
For now I have changed the view in Windows Explorer to not show “hidden items”
It hides all those transparent looking folders and files created for system reasons ( not just syncthing ) I think that is what Simon is saying, and is the easiest way.
But thanks for the for the suggestion by Audrius, I will peek in the advanced config and try hiding the .stfolder outside the syncfolders.
The file / folder must still be inside the syncfolder, not outside, even if you tell syncthing, that it should be .stfolder but bladibla.docx. Then bladibla.docx must exist or syncthing will stop.
Yes, that’s true. I’ve already planned to resolve this on the Android side. This is exotic like other Android stuff so on my opinion isn’t a need to change something upstream.
Anyone having the same issue on Android reading this? I’ve put up a test APK at https://drive.google.com/open?id=1FyPl16VXL6WAjuazSDIBtaN79ZRCTX0o and would appreciate feedback if this works correctly after adding a new folder and running the phone’s file cleanup utility. The workaround adds a dummy text file below the “.stfolder” directory.
i’m on a Huawei Mate 10 Pro so… Android 9 sure came with new „features“ one of wich cleans empty directories.
i circumvented this by just placing a empty file inside.
but i doubt 0815 users who got syncthing as recommendation or got help setting it up will be able to figure this out.
in addition:
why does this folder need to be present for a successful sync anyways?
i doubt syncthing is unable to recreate it on demand
It’s a safety check to prevent data loss. Imagine a drive with a syncthing folder getting silently unmounted or getting unreadable somehow - if syncthing rescans data, it might think that the user has deleted all of his files which would then propagate to other devices - resulting in possible data loss. Therefore the .stfolder is always checked for presence, to ensure that the directory is in fact readable and deletes are actual deletes and not errors.
If the folder is not present, syncthing assumes the folder has experienced an error (drive unmounted or similar) and will therefore stop it.
That’s why syncthing will never attempt to re-create the folder on it’s own (at least not without user interaction), as that would break the purpose of it.