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>
This commit is contained in:
committed by
Lukas Fleischer
parent
6f22e99ad5
commit
4285e88593
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user