X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-restore.c;h=7d8f44c4d7e856a43aab854a57f8c2d0ff623774;hp=4f4096ed15c79b11d06b97abfaa0be0b8fc2af5c;hb=5aba32208f5ffe6a90b8ff46e2d3ba66f08c888f;hpb=5fddc07dc31481453c1af186bf7da241c00cdbf1 diff --git a/notmuch-restore.c b/notmuch-restore.c index 4f4096ed..7d8f44c4 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -122,7 +122,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) synchronize_flags = notmuch_config_get_maildir_synchronize_flags (config); notmuch_opt_desc_t options[] = { - { NOTMUCH_OPT_POSITION, &input_file_name, 0, 0, 0 }, + { NOTMUCH_OPT_STRING, &input_file_name, "input", 'i', 0 }, { NOTMUCH_OPT_BOOLEAN, &accumulate, "accumulate", 'a', 0 }, { 0, 0, 0, 0, 0 } }; @@ -141,13 +141,12 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[]) input_file_name, strerror (errno)); return 1; } - optind++; } if (opt_index < argc) { fprintf (stderr, - "Cannot read dump from more than one file: %s\n", - argv[optind]); + "Unused positional parameter: %s\n", + argv[opt_index]); return 1; }