Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

same filename in two repositories shows once #432

Open
sleep-walker opened this issue Dec 16, 2024 · 3 comments
Open

same filename in two repositories shows once #432

sleep-walker opened this issue Dec 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sleep-walker
Copy link

  • I have searched for existing issues that may be the same as or related to mine. ✔️

Please complete the following information:

Device: Asus ROG Phone 6D
Android Version: 14
Orgzly Revived Version: 1.8.31 (fdroid)
Sync repository type (directory/Dropbox/WebDAV/Git): 2 directories

I have 2 repositories - one personal, one work related, they are synchronized using Syncthing.

The problem I have is that there are two files with the same name in different locations. Orgzly Revived shows just one of them. The fact that they have different #+TITLE doesn't make a difference.

@sleep-walker sleep-walker added the bug Something isn't working label Dec 16, 2024
@amberin
Copy link
Member

amberin commented Dec 17, 2024

Yes, it's good to get a ticket for this very real bug. Notebooks are uniquely indexed by name in the database: https://github.com/orgzly-revived/orgzly-android-revived/blob/master/app/src/main/java/com/orgzly/android/db/entity/Book.kt#L11. I don't know the history behind this. Maybe it's for good reasons; maybe not.

@sleep-walker
Copy link
Author

I don't know internals of this tool. But if you avoid various link types (or simply make the user responsible for not run into that), repository+filename or full path should be unique enough for DB.

@amberin
Copy link
Member

amberin commented Dec 17, 2024

repository+filename or full path should be unique enough for DB.

The book's ID is the primary key. The issue would probably be that lots of current code looks up books by name only, leveraging that index. It is probably complicated by the fact that you can link to different repos or no repo, which should not change the book's identity.

In any case, the current behavior is clearly a bug, since the user is not made aware of the current limitations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants