]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-restore.c
notmuch-restore: fix error message for extra positional parameter.
[notmuch] / notmuch-restore.c
index 08d5adcbe42271a1660bb56079c488052b5ab520..7d8f44c4d7e856a43aab854a57f8c2d0ff623774 100644 (file)
@@ -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;
     }