Sync: two notes differing only by case (`Note.md` / `note.md`) from Linux are merged on Windows and Android, and the merge deletes one of them on every device

Steps to reproduce

  1. 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.md containing upper
    • note.md containing lower
    • And, in two folders that differ only by case: Same/x.md containing upper folder, and same/x.md containing lower folder.
  2. Let Sync upload them. Both pairs are uploaded and visible in the remote vault.
  3. Connect a Windows device to the same remote vault and let it sync.
  4. 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.md is deleted.
  • Note.md holds lower. The text upper exists only in version history.
  • Same/x.md is deleted. Its text exists only in version history and deleted files.
  • The Linux device keeps an empty Same folder 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-headless 0.0.14 on Windows.
  • Linux device: obsidian-headless 0.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 writes note.md into Note.md and uploads it, so Note.md holds lower on every device. On the first change after the app restarts, Android deletes the remote note.md, and the Linux device deletes its copy. For the folders it logs Detected case sensitive folder collision, renaming folder | same, then Destination file already exists!, again every 30 seconds with no end. The sync status stays on error, and same/x.md never 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.