Skip to content

Prevent Syncthing from starting when storage permissions are denied#88

Merged
chenxiaolong merged 1 commit intomasterfrom
storage-perms
Apr 7, 2026
Merged

Prevent Syncthing from starting when storage permissions are denied#88
chenxiaolong merged 1 commit intomasterfrom
storage-perms

Conversation

@chenxiaolong
Copy link
Copy Markdown
Owner

When storage permissions are disabled, Android still makes the directory structure visible. Since Syncthing can access all of the shared folders and their .stfolder markers, it thinks that all of the files were deleted.

We can avoid potential data loss by preventing Syncthing from starting at all when storage permissions are denied. We do not need to worry about permission revocation because Android always kills the app when that happens.

When storage permissions are disabled, Android still makes the directory
structure visible. Since Syncthing can access all of the shared folders
and their .stfolder markers, it thinks that all of the files were
deleted.

We can avoid potential data loss by preventing Syncthing from starting
at all when storage permissions are denied. We do not need to worry
about permission revocation because Android always kills the app when
that happens.

Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong self-assigned this Apr 7, 2026
chenxiaolong added a commit that referenced this pull request Apr 7, 2026
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong merged commit 20ec545 into master Apr 7, 2026
1 check passed
@chenxiaolong chenxiaolong deleted the storage-perms branch April 7, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant