X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-new.c;h=5ac7eedff70bfff763bbe29e39a3f369f7537650;hb=1d4321ffa58ea9fab2f3069521d4dfb5e7ed0ce3;hp=ddf42c140802225078dce5a7316609404a439930;hpb=f5db7ad7d243785c274a99734c681e69d13313d0;p=notmuch diff --git a/notmuch-new.c b/notmuch-new.c index ddf42c14..5ac7eedf 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -662,7 +662,7 @@ setup_progress_printing_timer (void) struct sigaction action; struct itimerval timerval; - /* Setup our handler for SIGALRM */ + /* Set up our handler for SIGALRM */ memset (&action, 0, sizeof (struct sigaction)); action.sa_handler = handle_sigalrm; sigemptyset (&action.sa_mask); @@ -985,9 +985,16 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[]) return EXIT_FAILURE; add_files_state.total_files = count; } else { - if (notmuch_database_open (db_path, NOTMUCH_DATABASE_MODE_READ_WRITE, - ¬much)) + char *status_string = NULL; + if (notmuch_database_open_verbose (db_path, NOTMUCH_DATABASE_MODE_READ_WRITE, + ¬much, &status_string)) { + if (status_string) { + fputs (status_string, stderr); + free (status_string); + } + return EXIT_FAILURE; + } if (notmuch_database_needs_upgrade (notmuch)) { time_t now = time (NULL); @@ -1040,7 +1047,7 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[]) if (notmuch == NULL) return EXIT_FAILURE; - /* Setup our handler for SIGINT. We do this after having + /* Set up our handler for SIGINT. We do this after having * potentially done a database upgrade we this interrupt handler * won't support. */ memset (&action, 0, sizeof (struct sigaction));