summaryrefslogtreecommitdiffstats
path: root/git@git.beyermatthi.as:syncthing
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2024-05-24 08:51:02 +0200
committerGitHub <noreply@github.com>2024-05-24 08:51:02 +0200
commita2b8f2361ec0ccc07f46a19ed6dcc338cc96bf9a (patch)
tree5c8bff07d5e244b49f8245b7e6d939024591dcc7 /git@git.beyermatthi.as:syncthing
parent4b60e86d0247fcca5c2117f4a1ed8eb1f9ff5d94 (diff)
lib/config: Add file inside folder marker directory (#9525)HEADrelease-nightlymain
### Purpose Avoid the issue where the folder marker is deleted by overzealous cleanup tools because it's just a useless, empty directory. We create a small file containing a an admonishment to not delete the directory, and some metadata that is just for human consumption at the moment. (But it would parse as a valid yaml file if we wanted to read this, at some point.) This will only apply when _creating_ a folder marker, that is, existing setups will not gain the file automatically. Obviously, when using a custom folder marker none of this applies. Also, slightly adjust the permission bits for the folder marker directory and file on Unixes, making sure the group & write bits are unset. ### Testing I've created and deleted a few folders and it appears to behave as I expect. ### Screenshots ``` jb@ok:~/somefolder % ls -la total 0 drwxr-xr-x 3 jb staff 96 May 1 08:52 ./ drwx------ 12 jb staff 384 May 1 08:52 ../ drwxr-xr-x 3 jb staff 96 May 1 08:52 .stfolder/ jb@ok:~/somefolder % ls -l .stfolder total 8 -rw-r--r-- 1 jb staff 122 May 1 08:52 syncthing-folder-39a4b0.txt jb@ok:~/somefolder % cat .stfolder/syncthing-folder-39a4b0.txt # This directory is a Syncthing folder marker. # Do not delete. folderID: xtdca-cudyf created: 2024-05-01T08:52:49+02:00 ```
Diffstat (limited to 'git@git.beyermatthi.as:syncthing')
0 files changed, 0 insertions, 0 deletions