Headless sync infinitely deletes themes and CSS snippets

Summary

When ob sync runs in a headless container with appearance-data in its sync configuration, any CSS snippet or theme file uploaded by a real Obsidian client (desktop/mobile) is downloaded by the container and then immediately deleted from the remote in the same sync pass. This creates an infinite delete loop: the desktop client re-uploads, the container deletes again.


Reproduction steps

  1. Run ob sync (or ob sync --continuous) in a headless container with appearance-data in allowSpecialFiles.

  2. From a real Obsidian client, add a CSS snippet (e.g. .obsidian/snippets/my-style.css) to the vault.

  3. Wait for the headless container to sync.

  4. Observe the following sequence in the logs:

Push: .obsidian/snippets/my-style.css (updated)
Downloading .obsidian/snippets/my-style.css
Downloaded .obsidian/snippets/my-style.css
Accepted .obsidian/snippets/my-style.css
Deleting remote file .obsidian/snippets/my-style.css   ← bug

The file is downloaded to disk and accepted, then deleted from the remote in the same sync pass. On the next pass the desktop client re-uploads it and the cycle repeats.

2 Likes

I changed the title for clarity (was “Automatic remove of no .md files (pluigns folders and configs, and css snipets)”).

1 Like

Thanks, I was able to reproduce and fix. Published a fix in v0.0.4.

1 Like