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

Fix crash and History with books in read-only directories #4138

Merged
merged 1 commit into from Aug 6, 2018

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented Aug 5, 2018

docsettings can be stored either as a sidecar file (prefered, when possible), or as a .lua file in the koreader/history/ folder (good, when book is in a read-only directory where we can't create the
.sdr/ directory).
They are managed correctly if for some reason, the book directory becomes writable: the docsettings in history/ is read, used, and removed when a docsetting in a .sdr/ can be saved.
These docsettings in koreader/history/ contribute to the History list build: they are put it in history.lua, and the duplicates on next history.lua builds are removed.

This fix a crash when a book is in a read-only directory. Closes #3869.
I verified that I can now open on Android books stored on the external SDCard, and the docsetting is saved in koreader/history/ . Closes #3365. Closes #3483.
Also fix History containing strange entries like "Book.epub.lua", that came from the koreader/history/book.epub.lua.old backup, that weren't removed as they are not a duplicate. Closes #4118.

docsettings can be stored either as a sidecar file (prefered, when
possible), or as a .lua file in the koreader/history/ folder (good,
when book is in a read-only directory where we can't create the
.sdr/ directory).
They are managed correctly if for some reason, the book directory
becomes writable: the docsettings in history/ is read, used, and
removed when a docsetting in a .sdr/ can be saved.
These docsettings in koreader/history/ contribute to the History
list build: they are put it in history.lua, and the duplicates
on followups history.lua builds are removed.

This fix a crash when a book is in a read-only directory.
Also fix History containing strange entries like "Book.epub.lua",
that came from the koreader/history/book.epub.lua.old backup,
that weren't removed as they are not a duplicate.
@poire-z poire-z merged commit bb949af into koreader:master Aug 6, 2018
@poire-z poire-z deleted the fix_docsettings branch August 6, 2018 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant