diff options
Diffstat (limited to 'src/args.c')
-rw-r--r-- | src/args.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2020 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -112,7 +112,7 @@ static void version_arg(void) { printf(_("calcurse %s -- text-based organizer\n"), VERSION); putchar('\n'); - printf("%s\n", _("Copyright (c) 2004-2020 calcurse Development Team.")); + printf("%s\n", _("Copyright (c) 2004-2023 calcurse Development Team.")); printf("%s\n", _("This is free software; see the source for copying conditions.")); } @@ -428,7 +428,7 @@ int parse_args(int argc, char **argv) const char *cfile = NULL, *confdir = NULL; char *ifile = NULL; - int non_interactive = 1; + int ret, non_interactive = 1; int ch, cpid, type; regex_t reg; char buf[BUFSIZ]; @@ -963,10 +963,12 @@ int parse_args(int argc, char **argv) fmt_apt = fmt_rapt = fmt_ev = fmt_rev = NULL; fmt_todo = NULL; } - io_import_data(IO_IMPORT_ICAL, ifile, fmt_ev, fmt_rev, fmt_apt, - fmt_rapt, fmt_todo); + ret = io_import_data(IO_IMPORT_ICAL, ifile, fmt_ev, fmt_rev, + fmt_apt, fmt_rapt, fmt_todo); io_save_apts(path_apts); io_save_todo(path_todo); + if (!ret) + exit_calcurse(EXIT_FAILURE); } else if (export) { io_check_file(path_apts); io_check_file(path_todo); |