aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2018-06-03 10:24:22 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-06-03 10:28:28 +0200
commite55aead1267fedfca3485699716cd4031a508df3 (patch)
tree4d5cceb81fb9983b2fa4773cd43b2e44869ddda4 /src/io.c
parentd5961baa13127cc4b02a5e88bb11dc7c8e47d3a8 (diff)
downloadcalcurse-e55aead1267fedfca3485699716cd4031a508df3.tar.gz
calcurse-e55aead1267fedfca3485699716cd4031a508df3.zip
Only lock save mutex as short as possible
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/io.c b/src/io.c
index 93a606d..d0c80c5 100644
--- a/src/io.c
+++ b/src/io.c
@@ -570,7 +570,6 @@ void io_save_cal(enum save_display display)
}
run_hook("pre-save");
- io_mutex_lock();
show_bar = 0;
if (ui_mode == UI_CURSES && display == IO_SAVE_DISPLAY_BAR
@@ -597,11 +596,10 @@ void io_save_cal(enum save_display display)
if (!io_save_keys())
ERROR_MSG("%s", access_pb);
+ io_mutex_lock();
io_unset_modified();
-
io_compute_hash(path_apts, apts_sha1);
io_compute_hash(path_todo, todo_sha1);
-
io_mutex_unlock();
/* Print a message telling data were saved */