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

Feature: adjust conflict resolution to new behavior #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions source/desktop/sync-conflicts.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
Synchronization Conflicts
=========================

Working on encrypted data from multiple locations works the same as working on unencrypted data from multiple locations. If there is a synchronization conflict, it is handled similarly to how most cloud storage services deal with conflicts.
Working on encrypted data from multiple locations works the same as working on unencrypted data from multiple locations.
If there is a synchronization conflict, it is handled similarly to how most cloud storage services deal with conflicts.

When a sync conflict occurs, cloud storage services typically create a conflict file by appending a suffix (e.g., ``(1)``) to indicate that there was a conflict. You then need to determine which file to keep.
When a sync conflict occurs, cloud storage services typically create a conflict file by appending a suffix (e.g., ``(Created by Alice)``) to indicate that there was a conflict.
You then need to determine which file to keep.

Cryptomator handles encrypted files in the same way.
It detects synchronization conflicts and appends the suffix from your cloud provider to the decrypted filename.
If the filename with the conflict suffix is too long, Cryptomator shortens the overall filename.
And if the decrypted filename already exists, the conflicted file has a simple ``(X)`` suffix, where X is an integer.

| cloud provider suffix | original decrypted name | new decrypted name | comment |
|------------------------------------------|---------------------------------------------------|--------------------------------------------------------------------|-------------------------------------------------------------|
| (Created by Alice) | businessPitch.odp | businessPitch (Created by Alice).odp | regular case |
| (Created by Alice) | businessPitch.odp | businessPitch (1).odp | preferred name already taken |
| (Created by Alice on 2024-01-31) | businessPitchForTheGreatIdeaIHadLastNight.odp | businessPitchForTheGreatIdeaI (Created by Alice on 2024-01.odp | maximum cleartext of the vault is set to 62 |
Comment on lines +15 to +19
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Conflict Suffix Table Formatting Issue
The table provides an excellent overview of how conflict resolution transforms filenames. However, in the third row (line 19), the "new decrypted name" appears misformatted (e.g., it seems to be missing a closing parenthesis or has an incomplete truncation indicator). Please review and correct this formatting to prevent potential confusion.


Cryptomator handles encrypted files in the same way. It detects synchronization conflicts and displays the conflicted file with a ``(X)`` suffix, where X is an integer.

.. note::

Sync conflicts can happen in cloud storages for several reasons. In such cases, it is up to you to decide what to do with the conflicted files. It is recommended to manually check both files and determine which one to keep. If you conclude that both files are identical, you can delete one copy. The organization of your files is entirely in your hands.
Sync conflicts can happen in cloud storages for several reasons.
In such cases, it is up to you to decide what to do with the conflicted files.
It is recommended to manually check both files and determine which one to keep
If you conclude that both files are identical, you can delete one copy.
The organization of your files is entirely in your hands.

Handling Sync Conflicts
-----------------------

1. When a sync conflict is detected, Cryptomator will display the conflicted file with a ``(X)`` suffix, where X is an increasing integer.
1. When a sync conflict is detected, Cryptomator will display the conflicted file with a suffix, see above table
2. Manually review both the original and conflicted files.
3. Decide which file to keep based on your review.
4. If both files are identical, you can delete one of the copies to resolve the conflict.
Expand All @@ -24,8 +40,11 @@ By following these steps, you can effectively manage synchronization conflicts a
Example
-------

Suppose you have a file named ``document.txt`` in your vault. In the encrypted vault, this file might be represented with an encrypted name such as ``5TyvCyF255sRtfrIv...83ucADQ==.c9r``.
Suppose you have a file named ``projectPlan.doc`` in your vault.
In the encrypted vault, this file might be represented with an encrypted name such as ``5TyvCyF255sRtfrIv...83ucADQ==.c9r``.

If a synchronization conflict occurs, it will happen on the encrypted filename. Cryptomator detects unexpected patterns in the encrypted filename and handles the conflict accordingly.
If a synchronization conflict occurs, it will happen on the encrypted filename.
Cryptomator detects unexpected patterns in the encrypted filename and handles the conflict accordingly.

For example, if there is a conflict with ``5TyvCyF255sRtfrIv...83ucADQ== (1).c9r``, Cryptomator will decrypt the decryptable part of the filename and rename the file to include a conflict suffix. The conflicted file might be renamed to something like ``FHTa55bH...sUfVDbEb0gTL9hZ8nho.c9r``, which corresponds to ``document (1).txt``.
For example, if there is a conflict with ``5TyvCyF255sRtfrIv...83ucADQ== (Created by Alice).c9r``, Cryptomator will decrypt the encrypted part of the filename and rename the file to include a conflict suffix.
The conflicted file might be renamed to something like ``FHTa55bH...sUfVDbEb0gTL9hZ8nho.c9r``, which corresponds to ``projectPlan (Created by Alice).doc``.