Vault in OneDrive: deleted files are moved to the OneDrive root

Steps to reproduce

  • Freshly installed Obsidian, macOS system, official OneDrive client is running
  • Create the Vault inside the OneDrive folder, i.e. OneDrive > X > Obsidian
  • Create a note “Test”
  • The file appears on disk: OneDrive > X > Obsidian > Test.md
  • Delete the note from the Obsidian UI

Expected result

Test.md is moved to the Bin

Actual result

Check OneDrive folder, the file is actually there: OneDrive > Test.md

Environment

SYSTEM INFO:
Obsidian version: v1.1.16
Installer version: v1.1.16
Operating system: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 22.3.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Basically, that’s it. It’s 100% reproducible for me, with notes and canvases.

It is not reproducible outside Obsidian, i.e. if I manually create the file and then delete it from Finder, it’s properly moved to Bin.

This is a problem of onedrive and we have no control over it. Sorry!

You could try instead of sending the file to recycle bin to sent it to obsidian .trash folde, maybe it helps.

Would just like to confirm the solution here for anyone else looking:

Setting Obsidian to delete to System Vault while using OneDrive to sync the vault (on MacOS at least) results in the deleted files and folders ending up in the OneDrive root directory (not the Obsidian root, the entire synced account root).

Changing to using the .trash folder solves this but presumably will result in some cruft buildup over time. Permanently deleting is also an “option”.

Would be nice to have a 30 day ‘expiry’ for files in .trash to give enough time to save something but not build up indefinitely.

Same problem here.

How do you do this?

Or did anyone already came up with more elegant options?

Edit: found it:

we don’t provide support for third party sync solutions. This is one-drive doing.

A potential solution is to create and mount a Cryptomator vault on OneDrive, and within that encrypted vault is where you would place your Obsidian vault. This is a good thing to do anyway since then your Obsidian data is 100% encrypted and unreadable by Microsoft, who thoroughly enjoys going through peoples’ private files. Using this method described above, I have no issues deleting files within the app. Deleted files are properly synced on OneDrive.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.