X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-new.c;h=5ac7eedff70bfff763bbe29e39a3f369f7537650;hb=1d4321ffa58ea9fab2f3069521d4dfb5e7ed0ce3;hp=569100560accbc393a52b124d14f55178fb6e63d;hpb=26b6470db350cc4b319934c1caff261ada12b4bb;p=notmuch diff --git a/notmuch-new.c b/notmuch-new.c index 56910056..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); @@ -1031,8 +1038,7 @@ notmuch_new_command (notmuch_config_t *config, int argc, char *argv[]) return EXIT_FAILURE; } if (add_files_state.verbosity >= VERBOSITY_NORMAL) - printf ("Your notmuch database has now been upgraded to database format version %u.\n", - notmuch_database_get_version (notmuch)); + printf ("Your notmuch database has now been upgraded.\n"); } add_files_state.total_files = 0; @@ -1041,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));