X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-new.c;h=7788743da44dcfca5e8ce5ba1dce085025a79b5c;hp=3ff630478c613848f342ddbdb42fa625484254d0;hb=5fddc07dc31481453c1af186bf7da241c00cdbf1;hpb=1579fb334e0bbc42d5ae7692b184127f43ed7027 diff --git a/notmuch-new.c b/notmuch-new.c index 3ff63047..7788743d 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -903,9 +903,8 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) notmuch = notmuch_database_create (db_path); add_files_state.total_files = count; } else { - notmuch = notmuch_database_open (db_path, - NOTMUCH_DATABASE_MODE_READ_WRITE); - if (notmuch == NULL) + if (notmuch_database_open (db_path, NOTMUCH_DATABASE_MODE_READ_WRITE, + ¬much)) return 1; if (notmuch_database_needs_upgrade (notmuch)) {