X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch.c;h=d76425213dba3ffc6d76f4da66081d19e503887c;hp=a93df8235f605dc55160fe3a57ef963ac82271f7;hb=baf1867cc46b67b7227d39542c551cd54609a80b;hpb=af65f52acf4eac5b2187855a63895afe3386c074 diff --git a/notmuch.c b/notmuch.c index a93df823..d7642521 100644 --- a/notmuch.c +++ b/notmuch.c @@ -384,7 +384,7 @@ dump_command (int argc, char *argv[]) output = fopen (argv[0], "w"); if (output == NULL) { fprintf (stderr, "Error opening %s for writing: %s\n", - argv[1], strerror (errno)); + argv[0], strerror (errno)); ret = 1; goto DONE; } @@ -411,6 +411,7 @@ dump_command (int argc, char *argv[]) notmuch_results_has_more (results); notmuch_results_advance (results)) { + int first = 1; message = notmuch_results_get (results); fprintf (output, @@ -420,8 +421,6 @@ dump_command (int argc, char *argv[]) notmuch_tags_has_more (tags); notmuch_tags_advance (tags)) { - int first = 1; - if (! first) fprintf (output, " ");