wait a little to flush disk before quitting

I've been noticing in pensieve.love in particular that once a month or
so I lose data if I quit immediately after typing in something. Nothing
major, just the odd link between notes which leaves things in an
inconsistent state. Let's see if this helps.
This commit is contained in:
Kartik K. Agaram 2023-01-28 10:21:34 -08:00
parent 667f324a57
commit 18f44c9761
1 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,8 @@ function edit.quit(State)
-- make sure to save before quitting
if State.next_save then
save_to_disk(State)
-- give some time for the OS to flush everything to disk
love.timer.sleep(0.1)
end
end