DocSettings: fix settings not saved when book on read-only FS (#8448)

Witnessed on Android with books on the external SD card.
reviewable/pr8449/r1
poire-z 2 years ago committed by GitHub
parent 6d40c7c7ea
commit 1004081098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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')

Loading…
Cancel
Save