mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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.