]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-restore.c
notmuch-restore: remove extra increment of optind
[notmuch] / notmuch-restore.c
index 4f4096ed15c79b11d06b97abfaa0be0b8fc2af5c..09dd6918e8d45ab5ff1696d4f08c5975dbf4f74b 100644 (file)
@@ -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,7 +141,6 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
                     input_file_name, strerror (errno));
            return 1;
        }
-       optind++;
     }
 
     if (opt_index < argc) {