From 56a29600ad7a1e91fe0b0b0f3747092552319a46 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sun, 12 Jul 2009 20:37:40 +0000 Subject: Avoid a fatal error when launching calcurse in interactive mode if user directory does not exist (thanks Antoine for reporting it). --- ChangeLog | 3 +++ src/calcurse.c | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a33599..8d358a7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ * src/args.c (parse_args): fixed a bug that prevented the todo items from being imported or exported + + * src/calcurse.c: avoid a FATAL ERROR if user directory does not + exist (thanks Antoine for reporting it) 2009-07-11 Frederic Culot diff --git a/src/calcurse.c b/src/calcurse.c index 972d5f0..8673c48 100755 --- a/src/calcurse.c +++ b/src/calcurse.c @@ -1,4 +1,4 @@ -/* $calcurse: calcurse.c,v 1.82 2009/07/12 16:21:59 culot Exp $ */ +/* $calcurse: calcurse.c,v 1.83 2009/07/12 20:37:41 culot Exp $ */ /* * Calcurse - text-based organizer @@ -101,7 +101,10 @@ main (int argc, char **argv) if (non_interactive) exit_calcurse (EXIT_SUCCESS); else - io_set_lock (); + { + no_data_file = io_check_data_files (); + io_set_lock (); + } /* Begin of interactive mode with ncurses interface. */ sigs_init (&sigact); /* signal handling init */ @@ -158,7 +161,6 @@ main (int argc, char **argv) * configuration (the display is then updated), and then * the todo list, appointments and events. */ - no_data_file = io_check_data_files (); custom_load_conf (&conf, background); wins_erase_status_bar (); io_load_keys (conf.pager); -- cgit v1.2.3-54-g00ecf