diff options
author | Frederic Culot <calcurse@culot.org> | 2009-07-26 12:30:23 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-07-26 12:30:23 +0000 |
commit | aef6f012fe2904dcedf47b3bf9a36366841e49a2 (patch) | |
tree | f020e7d818640a6a8d03fded1286d6c2c58bdc1f /src | |
parent | 23817b6b7dbeb3a3c96c8c91e25cfdb14da7c46b (diff) | |
download | calcurse-aef6f012fe2904dcedf47b3bf9a36366841e49a2.tar.gz calcurse-aef6f012fe2904dcedf47b3bf9a36366841e49a2.zip |
Check for file presence added (thanks again Chris for reporting it).
Diffstat (limited to 'src')
-rwxr-xr-x | src/args.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: args.c,v 1.56 2009/07/15 19:16:22 culot Exp $ */ +/* $calcurse: args.c,v 1.57 2009/07/26 12:30:23 culot Exp $ */ /* * Calcurse - text-based organizer @@ -872,18 +872,22 @@ parse_args (int argc, char **argv, conf_t *conf) } if (tflag) { + io_check_file (path_todo, (int *)0); io_load_todo (); todo_arg (tnum, Nflag, preg); non_interactive = 1; } if (nflag) { + io_check_file (path_apts, (int *)0); io_load_app (); next_arg (); non_interactive = 1; } if (dflag || rflag || sflag) { + io_check_file (path_apts, (int *)0); + io_check_file (path_conf, (int *)0); io_load_app (); custom_load_conf (conf, 0); /* To get output date format. */ if (dflag) @@ -897,6 +901,8 @@ parse_args (int argc, char **argv, conf_t *conf) { date_t day; + io_check_file (path_apts, (int *)0); + io_check_file (path_conf, (int *)0); vars_init (conf); custom_load_conf (conf, 0); /* To get output date format. */ io_load_app (); |