summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/custom.c4
-rw-r--r--src/io.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/custom.c b/src/custom.c
index fff83d7..8aa714d 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -1154,4 +1154,8 @@ void custom_config_main(void)
wmove(win[STA].p, 0, 0);
wins_doupdate();
}
+ if (!config_save())
+ EXIT(_("Could not save %s."), path_conf);
+ if (!io_save_keys())
+ EXIT(_("Could not save %s."), path_keys);
}
diff --git a/src/io.c b/src/io.c
index d21b1fc..1ca2c2f 100644
--- a/src/io.c
+++ b/src/io.c
@@ -586,8 +586,12 @@ int io_save_cal(enum save_display display)
if (read_only)
return IO_SAVE_CANCEL;
- if (new_data() && (ret = resolve_save_conflict()))
- return ret;
+ if (new_data()) {
+ if ((ret = resolve_save_conflict()))
+ return ret;
+ } else
+ if (!io_get_modified())
+ return IO_SAVE_CANCEL;
run_hook("pre-save");
io_mutex_lock();