Use case or problem
I’m working with a vault that is not always present. (It lives in an encrypted mount point, but removable drives or just moving folders around would trigger the same problem)
If I open the vault while it is absent Sync detects the “missing” files and sends “delete” events for all notes.
Proposed solution
Implement some kind of (optional) sanity-check to decide if syncing is currently a good idea. In Order of complexity:
- Check for a marker file like Syncthing does: FAQ — Syncthing documentation - A simple filed named for example .obsidian-sync must be present in the vault location to allow sync
- Check for the .obsidian folder - if its missing something is definitely wrong
- Check for number of deletions to be synced and warn if it’s more than X notes or more than Y % of the total. This would catch partial vault deletions as well but requires the most logic.
Current workaround (optional)
I’m currently launching Obsidian with a URI to always open a “normal” vault. This mitigates the problem a bit as I can double check my mount point before opening the “secret” vault
Related feature requests (optional)
Similar situation but subtly different. In my case the containing folder is always present, which keeps the vault in the selector but if the contents are missing, things go off the rails.