Steps to reproduce
- On Linux (case-sensitive file system), in a vault connected to Sync, create two notes whose names differ only by case, with different text:
Note.mdcontaininguppernote.mdcontaininglower- And, in two folders that differ only by case:
Same/x.mdcontainingupper folder, andsame/x.mdcontaininglower folder.
- Let Sync upload them. Both pairs are uploaded and visible in the remote vault.
- Connect a Windows device to the same remote vault and let it sync.
- Let the Linux device sync again.
Did you follow the troubleshooting guide? [Y/N]
Y. Tested with a brand-new remote vault, no plugins, and a fresh device.
Expected result
Windows cannot store both names, so it keeps one of each pair and tells me about the other (“Unable to download file with illegal name”, or a conflict notice). It never deletes anything on the server.
Actual result
The Windows device’s sync log shows:
Downloading file | Note.md
Downloading complete | Note.md
Downloading file | note.md <- written into the same file on disk
Downloading complete | note.md
Deleting remote file | note.md
Uploading file | Note.md <- now holds the text of note.md
Detected case sensitive folder collision, renaming folder | same
Deleting remote folder | Same
On a later sync, from a relaunch of the desktop app or a second run of the headless client:
Deleting remote file | Same/x.md
Result on every device, Linux included:
note.mdis deleted.Note.mdholdslower. The textupperexists only in version history.Same/x.mdis deleted. Its text exists only in version history and deleted files.- The Linux device keeps an empty
Samefolder and uploads it again on each sync, and Windows deletes it again.
Nothing is shown to the user. The only trace is the sync log, and it reads as ordinary activity.
Environment
- Windows device: Obsidian desktop 1.15.0 (installer 1.14.4), Windows 11, NTFS. Also reproduced with the official headless client
obsidian-headless0.0.14 on Windows. - Linux device:
obsidian-headless0.0.14 on Ubuntu (ext4). The same happens with any Linux desktop vault.
SYSTEM INFO:
Obsidian version: 1.15.0
Installer version: 1.14.4
Operating system: Windows 11 Pro 10.0.26300
Login status: logged in
Insider build toggle: on
Restricted mode: on
Additional information
- This is not the case-only rename of t/47768. Here nothing is renamed: two files that are legal side by side on Linux are merged by the Windows client, which then pushes the merge back. The Sync help (Sync messages) covers characters and reserved names, but not case.
- Android does the same with the notes, and loops on the folders. Measured on Obsidian Android 1.13.6 (emulator, API 37 image), with the vault both in shared storage (
Documents/) and in app storage (Android/data/md.obsidian/files/). Both locations are case-insensitive. The first sync writesnote.mdintoNote.mdand uploads it, soNote.mdholdsloweron every device. On the first change after the app restarts, Android deletes the remotenote.md, and the Linux device deletes its copy. For the folders it logsDetected case sensitive folder collision, renaming folder | same, thenDestination file already exists!, again every 30 seconds with no end. The sync status stays on error, andsame/x.mdnever reaches the device. Nothing is deleted there, at least over the four sessions I watched. - A macOS device on the default case-insensitive APFS, and probably iOS, are in the same position as Windows.
- The download path looks the target up with
stat, which on a case-insensitive file system finds the other file, and then writes over it. A fix could check, before writing a download, whether the path is already taken by a different-cased remote path that is still alive. If it is, skip that download with a “case conflict” message, as illegal names are skipped, rather than writing and then deleting.