orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
602 stars 38 forks source link

Can’t sync to empty folder #324

Closed anotherboringuser closed 1 week ago

anotherboringuser commented 1 week ago

When setting my Sync Repository to a local empty folder, I get the “Notebook has no repository link” error. I would expect orgzly to just create a file in that location.

I’ve been using orgzly for a while now and always synced the files to a local folder so I could create backups. I occasionally got random syncing issues, but they where usually resolved by removing the backup file from the local folder, then syncing so orgzly could create the file again. This doesn’t seem to be working anymore. If I move a backup file to the empty sync repository I get “Notebook has no link and one or more remote notebooks with the same name exist”. Why doesn’t orgzly just create a link if the folder is empty?

Please complete the following information:

Device: OnePlus 6
Android Version: 14 (Lineage OS 21-20240911-NIGHTLY-enchilada)
Orgzly Revived Version: 1.8.26
Sync repository type (directory/Dropbox/WebDAV/Git): local
amberin commented 1 week ago

I get the “Notebook has no repository link” error. I would expect orgzly to just create a file in that location.

I suspect this is a result of fixing #77.

Previously, if a file linked to a notebook was deleted in the repository, Orgzly would re-create it upon the next sync, because it thought "hey, there is only one repo, so I know where to store this notebook I have". This was a bug which has been fixed.

I'm afraid you will need to find another way to resolve sync issues. Have you tried force-saving?

(The best thing would of course be to get at the root cause of your sync issues.)

anotherboringuser commented 1 week ago

Thank you, I missed the force sync option. Do new user when setting up sync also need to force sync for the first sync? Because if that is the case, they should be prompted to do so somehow.

Also, how does orgzly judge whether the local or remote notebook have been modified (so I can get to the root cause of my sync issues if they happen again)

amberin commented 1 week ago

Thank you, I missed the force sync option. Do new user when setting up sync also need to force sync for the first sync? Because if that is the case, they should be prompted to do so somehow.

No, that would be a bug.

Also, how does orgzly judge whether the local or remote notebook have been modified (so I can get to the root cause of my sync issues if they happen again)

@anotherboringuser For directory repos, we only go by file timestamps. So there might be another app updating the timestamp. Since the directory repo type offers no conflict resolution, both local and remote changes is always considered an error.