diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-01-28 10:21:34 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-01-28 10:21:34 -0800 |
commit | 18f44c97617b6c4a96e10077a805d3fcdf70fba1 (patch) | |
tree | 9695453c370c2287ef692306b402c2e6616084e3 | |
parent | 667f324a570406534cf2751463ebb3f78c310ce0 (diff) | |
download | view.love-18f44c97617b6c4a96e10077a805d3fcdf70fba1.tar.gz |
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.
-rw-r--r-- | edit.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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 |