dovecot-2.0: doveadm: Previous mailbox create -s fix broke -A/-u...

dovecot at dovecot.org dovecot at dovecot.org
Fri Feb 11 23:35:56 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/775a3a64ea74
changeset: 12596:775a3a64ea74
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Feb 11 23:35:52 2011 +0200
description:
doveadm: Previous mailbox create -s fix broke -A/-u parameters.
Fixed now properly the root cause: -S parameter was handled as -s by getopt.

diffstat:

 src/doveadm/doveadm-mail.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 723a26a7d328 -r 775a3a64ea74 src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Thu Feb 10 14:58:43 2011 +0100
+++ b/src/doveadm/doveadm-mail.c	Fri Feb 11 23:35:52 2011 +0200
@@ -372,7 +372,7 @@
 
 	ctx = doveadm_mail_cmd_init(cmd);
 
-	getopt_args = t_strconcat("As:u:", ctx->getopt_args, NULL);
+	getopt_args = t_strconcat("AS:u:", ctx->getopt_args, NULL);
 	username = getenv("USER");
 	wildcard_user = NULL;
 	while ((c = getopt(argc, argv, getopt_args)) > 0) {
@@ -399,8 +399,7 @@
 				doveadm_mail_help(cmd);
 		}
 	}
-	if (optind > 0)
-		argv += optind - 1;
+	argv += optind;
 	if (argv[0] != NULL && cmd->usage_args == NULL) {
 		i_fatal("doveadm %s: Unknown parameter: %s",
 			cmd->name, argv[0]);


More information about the dovecot-cvs mailing list