X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-dump.c;h=5c8213bee7892d602367971cb71c2ab436c0324e;hb=036734252d07d8568937073d4f2d366bcb06bc4e;hp=eb629dc9f10ec7e2caf96a2f1d9d5d5c93c920c0;hpb=319efe21c9d2754c99951cecc71184faf7ca9054;p=notmuch diff --git a/notmuch-dump.c b/notmuch-dump.c index eb629dc9..5c8213be 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -339,7 +339,7 @@ notmuch_database_dump (notmuch_database_t *notmuch, output = NULL; goto DONE; } else - output = NULL; + output = NULL; if (output_file_name) { ret = rename (tempname, output_file_name); @@ -361,18 +361,11 @@ notmuch_database_dump (notmuch_database_t *notmuch, } int -notmuch_dump_command (notmuch_config_t *config, unused(notmuch_database_t *notmuch), int argc, char *argv[]) +notmuch_dump_command (notmuch_database_t *notmuch, int argc, char *argv[]) { - notmuch_database_t *notmuch; const char *query_str = NULL; int ret; - if (notmuch_database_open (notmuch_config_get_database_path (config), - NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much)) - return EXIT_FAILURE; - - notmuch_exit_if_unmatched_db_uuid (notmuch); - const char *output_file_name = NULL; int opt_index; @@ -399,7 +392,7 @@ notmuch_dump_command (notmuch_config_t *config, unused(notmuch_database_t *notmu if (opt_index < 0) return EXIT_FAILURE; - notmuch_process_shared_options (argv[0]); + notmuch_process_shared_options (notmuch, argv[0]); if (include == 0) include = DUMP_INCLUDE_CONFIG | DUMP_INCLUDE_TAGS | DUMP_INCLUDE_PROPERTIES;