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

Comments and notes are lost after changing the save location of the document #229

Open
cary-rowen opened this issue Jun 26, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@cary-rowen
Copy link
Collaborator

Describe the Problem

If the user changes the save location of the document, they will not be able to view comments and notes previously saved for this document.

To Reproduce

Steps to reproduce the behavior:

  1. Open a document.
  2. Add some notes or comments.
  3. Close the document, save the document to another location
  4. Reopen the document
  5. Unable to find saved notes and comments.

Expected behavior

Users can still view saved comments and annotations despite changing the save location.

If the problem is related to a file, indicate the file you have opened

None

Desktop (please complete the following information):

  • OS: [Windows 10 22H2 (AMD64) build 19045.3086]
  • Bookworm version [Latest Build]
  • Recent settings you may have changed in Bookworm [None]

Additional context

Can a document URI be an MD5 checksum?
@mush42

@mush42
Copy link
Collaborator

mush42 commented Jun 26, 2023

Hi @cary-rowen

Initially Bookworm used the content hash as an identifier, but this was an overkill for large documents, and is not applicable for documents that are loaded incrementally into memory.

Nevertheless, your point is valid, and the issue will be fixed as soon as possible.

Best

@cary-rowen
Copy link
Collaborator Author

Hi @mush42

Do you have any new ideas for a solution to this, or would it require too much of a change to implement?
When I reinstalled the OS, the books saved in oneDrive were forced to change locations, so I couldn't see the notes I saved before, LOL.

Best

@cary-rowen
Copy link
Collaborator Author

Not long ago, @mush42 provided a solution to this issue in a private chat with me:

#229: That one is easily fixable. For documents we load from the file system, we can use the sha1 hash of the document file and use it as an identifier in the database. Regardless of the path, as long as the bytes are the same, we load the same annotations.

However @mush42 you stated in your previous comment that there may be additional performance overhead associated with using file hash.

Do you or @pauliyobo have any thoughts to share about this?

Thanks

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

3 participants