mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Use fsync() for more robust setting files saving
Bump base for util.fsyncOpenedFile() and util.fsyncDirectory(). Use these to force flush to storage device when saving luasetting, docsetting, and history.lua. Also dont rotate them to .old until they are at least 60 seconds old. Also make auto_save_paging_count count right. Also bump crengine: open (as text) small or empty files
This commit is contained in:
@@ -928,11 +928,10 @@ function ReaderView:onReaderReady()
|
||||
end
|
||||
else
|
||||
self.autoSaveSettings = function()
|
||||
self.auto_save_paging_count = self.auto_save_paging_count + 1
|
||||
if self.auto_save_paging_count == DAUTO_SAVE_PAGING_COUNT then
|
||||
self.ui:saveSettings()
|
||||
self.auto_save_paging_count = 0
|
||||
else
|
||||
self.auto_save_paging_count = self.auto_save_paging_count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user