Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typical Syncthing files to default exclusion #6524

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

Zocker1999NET
Copy link
Contributor

@Zocker1999NET Zocker1999NET commented Mar 9, 2024

For increasing default interoperability between Syncthing & Nextcloud if users may want to sync a (sub-)directory with both tools without thinking about that those hidden files synced by Nextcloud might break Syncthing.

I want to propose this change:

  • because I think it should typically increases the "just works" interoperability between Nextcloud Desktop & Syncthing if they are working on the same directory
  • because I saw no other issue / PR which already did propose the same

If you think this change is too problematic or have some other reason, feel free to reject.

For context

Syncthing is another file synchronization client. However, it is based on peer-to-peer connections in a cluster of devices than on syncing everything with a central server. Hence I think there are non-niche use cases where it makes sense to use both together (e.g. Nextcloud allows me fast access to (just some of) my files from everywhere & allows easy sharing those in any granularity; Syncthing allows syncing a directory from/to Android, requires no dedicated server & can utilize local connections).

Syncthing uses these three directories/files as follows:

  • .stfolder: empty directory, used to determine that this directory is part of a Syncthing folder synchronization
    • syncing this dir via Nextcloud to another device may hinder a Syncthing client in adding this directory as sync folder
    • Syncthing also stops syncing a folder if this dir is missing, e.g. when this is on a an external drive which is currently not mounted
  • .stignore: ignore file for local Syncthing client
    • could be useful for in usecases if Nextcloud syncs this
    • Syncthing does not sync this file because it is meant to be local only
    • and for Syncthing users there are workarounds available so that its content can still be synced, which should also be helpful for Nextcloud
  • .stversions: if enabled, Syncthing stores old versions of files here (on incoming change or deletion)
    • same concept as .stignore, not synced because it is meant to be local only
    • depending on use case, it can be useful to sync this dir
    • however, IMO its the better default to not intervene into Syncthings procedures
      • e.g. letting other cloud users delete data from that directory
      • or keeping files uploaded which the user thinks was deleted
    • because if users really want to sync this directory, they can exclude it for those cases

TODO for me:

  • Sign-Off Commit
  • Build client & test if default excludes are correctly applied

@claucambra
Copy link
Collaborator

Thanks!

For increasing default interoperability between Syncthing & Nextcloud if users may want to sync a (sub-)directory with both tools without thinking about that those hidden files synced by Nextcloud might break Syncthing

Signed-off-by: Felix Stupp <[email protected]>
@claucambra claucambra merged commit fc9e69e into nextcloud:master Apr 10, 2024
8 of 11 checks passed
@Zocker1999NET Zocker1999NET deleted the patch-1 branch April 11, 2024 15:41
@mgallien mgallien added this to the 3.13.0 milestone Apr 24, 2024
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.

3 participants