mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
DocSettings: fix settings not saved when book on read-only FS (#8448)
Witnessed on Android with books on the external SD card.
This commit is contained in:
@@ -309,7 +309,13 @@ function DocSettings:flush()
|
||||
|
||||
-- If we can write to sidecar_file, we do not need to write to history_file
|
||||
-- anymore.
|
||||
local serials = { self.sidecar_file, self.history_file }
|
||||
local serials = {}
|
||||
if self.sidecar_file then
|
||||
table.insert(serials, self.sidecar_file)
|
||||
end
|
||||
if self.history_file then
|
||||
table.insert(serials, self.history_file)
|
||||
end
|
||||
self:ensureSidecar(self.sidecar)
|
||||
local s_out = dump(self.data)
|
||||
os.setlocale('C', 'numeric')
|
||||
|
||||
Reference in New Issue
Block a user