aboutsummaryrefslogtreecommitdiffstats
path: root/src/args.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2018-08-17 21:49:39 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2018-12-14 10:35:11 +0100
commit4285e8859353c31b39fa9539a89e58dc3a020264 (patch)
tree099e93aa2103026f88666799b2bd297993d71d1c /src/args.c
parent6f22e99ad5187f1c80717bfbe0d84d7dd12a2dba (diff)
downloadcalcurse-4285e8859353c31b39fa9539a89e58dc3a020264.tar.gz
calcurse-4285e8859353c31b39fa9539a89e58dc3a020264.zip
Rewrite of io_init()
The introduction of the "-C <confdir>" option is an opportunity to review the initialization of data paths. It lead to a rewrite. Two "root" directories are used (data and configuration files); by default they are identical. The statically allocated path buffers are turned into dynamically allocated buffers. Missing files/directories now include hooks. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/args.c')
-rw-r--r--src/args.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/args.c b/src/args.c
index 9e22d8d..e166f5a 100644
--- a/src/args.c
+++ b/src/args.c
@@ -727,8 +727,10 @@ int parse_args(int argc, char **argv)
from = date_sec_change(to, 0, range);
io_init(cfile, datadir, confdir);
- io_check_dir(path_dir);
+ io_check_dir(path_ddir);
io_check_dir(path_notes);
+ io_check_dir(path_cdir);
+ io_check_dir(path_hooks);
vars_init();
if (status) {