Open thorms11 opened 1 year ago
I have "Always create missing files" enabled, but all the notes where there. I had edited them, adding additional tags and notes, but I left the title the same. I'm seeing "{file name} 2" now for each file.
I guess I'll turn off Always create missing files for now, but it seems like if the file name already exists, it shouldn't try to recreate the file.
Though this makes me wonder how it handles the edge case of additional highlights/notes being added in Matter. Does it overwrite the file, merge the two, or just append new highlights?
@thorms11 @ryanjm I'm also experiencing this issue and it's getting worse. Some of my older matter syncs have been duplicated multiple times (e.g. 2, 3 appended to file title). If delete them all and start again any of the files that had duplicates previously, get synced with the largest duplicate number, i.e. a file duplicated 3 times on a fresh sync would be named Title-3.md
BUT I believe I found the cause and a solution in case it's helpful:
Within your vault if you check out .obsidian/plugins/matter/data.json
you'll see a field called 'contentMap' that has a mapping between file names and what I assume are item id's in Matter's database for your user account.
I noticed that some of these file names were the duplicates (i.e. ended in 2 or 3) but not the originals. I'm also using Obsidian sync between an iOS device and a macOS device and noticed that duplicates were more likely when I had not switched between devices in a while. At the same time I've had sync on startup enabled in the Matter plugin on both devices.
For me, I think this created a kind of "race condition" between Obsidian sync and Matter sync, which itself depends on a file managed by Obsidian sync (data.json
). When launching Obsidian on a device for the first time in a while, these competed and sometimes the freshest data.json
would be pulled to the device after the matter sync had just completed which ran using the old version of data.json
.
I can't 100% verify this is exactly what was happening, but it seems to make sense given my situation and setup.
The fix for me was (assuming you're also currently using Obsidian sync and automatic Matter sync on startup):
data.json
to match the file name changes from the previous step
This bug was fixed, but seems to be back.
See screenshots: https://share.icloud.com/photos/08cF_RV0KJ9Syrf8r3UhVtcMg
I do not have recreate note on.