Avoid a fatal error when launching calcurse in interactive mode if user directory does not exist (thanks Antoine for reporting it).

This commit is contained in:
Frederic Culot 2009-07-12 20:37:40 +00:00
parent d374a2ec2e
commit 56a29600ad
2 changed files with 8 additions and 3 deletions

View File

@ -13,6 +13,9 @@
* src/args.c (parse_args): fixed a bug that prevented the todo * src/args.c (parse_args): fixed a bug that prevented the todo
items from being imported or exported 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 <frederic@culot.org> 2009-07-11 Frederic Culot <frederic@culot.org>
* === Released 2.6 === * === Released 2.6 ===

View File

@ -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 * Calcurse - text-based organizer
@ -101,7 +101,10 @@ main (int argc, char **argv)
if (non_interactive) if (non_interactive)
exit_calcurse (EXIT_SUCCESS); exit_calcurse (EXIT_SUCCESS);
else else
{
no_data_file = io_check_data_files ();
io_set_lock (); io_set_lock ();
}
/* Begin of interactive mode with ncurses interface. */ /* Begin of interactive mode with ncurses interface. */
sigs_init (&sigact); /* signal handling init */ sigs_init (&sigact); /* signal handling init */
@ -158,7 +161,6 @@ main (int argc, char **argv)
* configuration (the display is then updated), and then * configuration (the display is then updated), and then
* the todo list, appointments and events. * the todo list, appointments and events.
*/ */
no_data_file = io_check_data_files ();
custom_load_conf (&conf, background); custom_load_conf (&conf, background);
wins_erase_status_bar (); wins_erase_status_bar ();
io_load_keys (conf.pager); io_load_keys (conf.pager);