From 18f44c97617b6c4a96e10077a805d3fcdf70fba1 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 28 Jan 2023 10:21:34 -0800 Subject: [PATCH] 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. --- edit.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/edit.lua b/edit.lua index 727f6e0..dd9b09b 100644 --- a/edit.lua +++ b/edit.lua @@ -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