X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-new.c;h=b7a5f2eabcfc5cc736ee4601807060c73d3db088;hb=b5eaa8ee83b7e6e54ab14cb5c13d6bc5721f522a;hp=1162e25a1273975c7a9c77473f5e6299e23fbc13;hpb=c84ccb70f3ed2b2228346499b5110311039a0ecf;p=notmuch diff --git a/notmuch-new.c b/notmuch-new.c index 1162e25a..b7a5f2ea 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -403,8 +403,11 @@ add_file (notmuch_database_t *notmuch, const char *filename, break; /* Non-fatal issues (go on to next file). */ case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID: - if (state->synchronize_flags) - notmuch_message_maildir_flags_to_tags (message); + if (state->synchronize_flags) { + status = notmuch_message_maildir_flags_to_tags (message); + if (print_status_message ("add_file", message, status)) + goto DONE; + } break; case NOTMUCH_STATUS_FILE_NOT_EMAIL: fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename); @@ -1139,7 +1142,7 @@ notmuch_new_command (notmuch_database_t *notmuch, int argc, char *argv[]) if (opt_index < 0) return EXIT_FAILURE; - notmuch_process_shared_options (argv[0]); + notmuch_process_shared_options (notmuch, argv[0]); /* quiet trumps verbose */ if (quiet) @@ -1194,8 +1197,6 @@ notmuch_new_command (notmuch_database_t *notmuch, int argc, char *argv[]) return EXIT_FAILURE; } - notmuch_exit_if_unmatched_db_uuid (notmuch); - if (notmuch_database_get_revision (notmuch, NULL) == 0) { int count = 0; count_files (mail_root, &count, &add_files_state);