Skip to content

feat(sync): per-account conflict policy - #339

Merged
gnacho merged 1 commit into
mainfrom
feat/338-conflict-policy
Nov 12, 2026
Merged

gnacho merged 1 commit into
mainfrom
feat/338-conflict-policy

Conversation

@gnacho

@gnacho gnacho commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Closes #338.

The engine always wrote a (Nextcloud conflicted copy <date>) file when the same path changed on both sides. This adds a per-account policy in Advanced synchronization:

  • Keep both copies (default, unchanged).
  • Keep the newest: the older side is discarded and no conflict copy is written.

The policy is applied in the reconciler, so the copy is never written in the first place. A file/directory collision is never resolved by the policy: dropping a directory because the other side has a file is destructive, so those keep the current safe behaviour.

Tests cover the three reconciler cases (local newer uploads, remote newer downloads, type collision stays a conflict) and the config default and parsing. ES strings included.

Keeping both copies stays the default and does not change. The new option keeps the newest side and drops the older one, so no conflicted copy is written to the folder.

A file/directory collision is never resolved by the policy: dropping a directory because the other side has a file is destructive, so those keep the safe behaviour.

Closes #338
@gnacho
gnacho merged commit 2238d16 into main Nov 12, 2026
2 checks passed
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.

Conflict policy: keep both copies or keep the newest

1 participant