[PATCH 2/2] notmuch-restore: fix error message for extra positional parameter.

Subject: [PATCH 2/2] notmuch-restore: fix error message for extra positional parameter.

Date: Wed, 14 Nov 2012 22:42:39 -0400

To: notmuch@notmuchmail.org

Cc: David Bremner

From: david@tethera.net


From: David Bremner <bremner@debian.org>

Note that a single positional parameter will take this code path also,
so the old message really makes no sense anymore.
---
 notmuch-restore.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/notmuch-restore.c b/notmuch-restore.c
index 09dd691..7d8f44c 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -145,8 +145,8 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])
 
     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;
     }
 
-- 
1.7.10.4


Thread: