dovecot-1.0: Don't assert-crash if trying to create mailbox prefix.

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 22 17:05:29 EEST 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/6bbb20cdaf1e
changeset: 5409:6bbb20cdaf1e
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 22 17:05:25 2007 +0300
description:
Don't assert-crash if trying to create mailbox prefix.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/imap/cmd-create.c |    5 ++++-

diffs (15 lines):

diff -r d144e54f09e6 -r 6bbb20cdaf1e src/imap/cmd-create.c
--- a/src/imap/cmd-create.c	Sat Sep 22 14:28:01 2007 +0300
+++ b/src/imap/cmd-create.c	Sat Sep 22 17:05:25 2007 +0300
@@ -23,7 +23,10 @@ bool cmd_create(struct client_command_co
 	len = strlen(full_mailbox);
 	if (len == 0 || full_mailbox[len-1] != ns->sep)
 		directory = FALSE;
-	else {
+	else if (*mailbox == '\0') {
+		client_send_tagline(cmd, "NO Namespace already exists.");
+		return TRUE;
+	} else {
 		/* name ends with hierarchy separator - client is just
 		   informing us that it wants to create children under this
 		   mailbox. */


More information about the dovecot-cvs mailing list