-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
kosync call to Document:fastDigest() and partial_md5_checksum useful ? #3132
Description
Just thought I would add this as a note to #3131 , but it seems like a bug:
The metadata.lua is also backuped when the document is opened, by the kosync plugin's KOSync:onReaderReady(), at:
koreader/plugins/kosync.koplugin/main.lua
Line 67 in 17014f9
| function KOSync:onReaderReady() |
which is calling
Document:fastDigest() at:koreader/frontend/document/document.lua
Line 114 in 17014f9
| function Document:fastDigest() |
But this Document:fastDigest() does its own opening and saving of the docsettings (to save a partial_md5_checksum properties) in that function.
This docsettings has already been read by Reader, and when it will be saved, it's what was read at opening that will be saved, so it will never include this partial_md5_checksum.
So, next time the document is opened, this partial_md5_checksum is absent, and the whole process is done again.
Moreover, it seems nothing in the code requests that saved partial_md5_checksum settings...
As I don't know much about what kosync and fastDigest do/mean, I won't touch that, but there's something strange, may be it's a leftover from some past times ?