Changing of the case (e.g. UPPER->lower) in folder and file names leads to sync conflicts
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
I have faced with interesting bug, which is related to specificities of client and server file systems. The server OS is Ubuntu, while the client OS is primary Windows. Linux tolerates different registers in file/folder names while Windows doesn't.
Use case 1:
- User A creates folder "OCTOBER" in a group folder using Windows NC Desktop Client.
- He/she creates document.txt in the folder OCTOBER, saves it and closes it.
- The file is synced with the NC cloud.
- User B opens this file in his/her Windows NC Desktop Client and works with it.
- User A re-thinks that the folder name should be "October" and changes it in his/her Windows NC Desktop Client. User B still edits the document.
- User B finishes editing the document and saves it.
- On the server two folders exist: OCTOBER and October.
- User B gets the error "Access Denied" in his/her NC Desktop Client, ALL syncing operations are stopped. He/she tries to Sync manually. Finally, the NC Desktop Client decides that the file document.txt is no more a place to save and it DELETES it.
- User B complains to me that his/her work has gone!
Use case 2:
- User A creates subfolder "MR JOHN DOW" in the folder "Scanned docs" in some group folder.
- User B opens the folder "MR JOHN DOW" through File Explorer on his Windows PC.
- User B scans documents and saves them to that folder. They are synced with the cloud.
- User B has a network outage, however, he continues to scan documents. The syncing is stopped.
- User A decides to rename the subfolder to "Mr John Dow".
- Two sub-folders appear on the server: "MR JOHN DOW" and "Mr John Dow".
- User B fixes his network outage and continues to scan docs. The syncing is restored. User B finds a lot of errors "Access denied". The syncing is stuck. He closes the scan program, and tries to sync manually, and his docs are gone.
Both cases are leading to the disaster from the point of view of User B, as all his work is gone.
All these cases demand manual intrusion from my side: move docs from one folder to another, delete one of folders, and forcibly re-sync the clients.
There may be several suggestions, eg controlling the file/folder naming in Nextcloud: so, not possible to have the folder/file names with the same names but in different registers).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two Windows-client and Ubuntu-server scenarios described in the report, including a case-only folder rename during offline or concurrent editing. Trace the resulting sync errors and deletion behavior, then verify that case-changing renames no longer create conflicting folders or discard the edited documents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- backend, distributed-systems, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100