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:
parent
667f324a57
commit
18f44c9761
2
edit.lua
2
edit.lua
|
@ -192,6 +192,8 @@ function edit.quit(State)
|
||||||
-- make sure to save before quitting
|
-- make sure to save before quitting
|
||||||
if State.next_save then
|
if State.next_save then
|
||||||
save_to_disk(State)
|
save_to_disk(State)
|
||||||
|
-- give some time for the OS to flush everything to disk
|
||||||
|
love.timer.sleep(0.1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue