vrtmrz / obsidian-livesync

MIT License
3.93k stars 132 forks source link

Removing and adding vault requires every conflict to be acknowledged. #364

Open CupricReki opened 5 months ago

CupricReki commented 5 months ago

I wanted to move the vault folder location locally so I removed the vault from Obsidian, moved the folder and re-added it. Obsidian-livesync log showed that the files as merged but the same.

Restart of Obsidian on any connected device showed a conflicting file need resolved. I click HERE and it showed a list containing every single file. Selecting the file for conflict resolution just closed the command palette without showing any conflicts.

I had to go to 'Resolve all conflicted files' via the command palette and select every single file, one by one. Each time I selected Resolve all conflicted files the command palette would just close and not show any options.

There were no conflicts with any files.

vrtmrz commented 5 months ago

Self-hosted LiveSync stores information to the local database. Due to historical reasons, the local database has just been identified by the vault name. (Fortunately, I found a workaround, so this behaviour will be fixed).

Thus, if we use the same name for the vault, Self-hosted LiveSync will try to apply the old local database to the new vault. And if these files have a different modified time to the old database (and usually so), these files could be stored as a conflicted revision. We can resolve conflict (in other words, select a living revision), automatically if the contents are the same, if we choose the file. I think that this is what you have seen.

However, It might be good to have the ability to do everything, even just the things that can be done automatically. I would like to support this in the future.