changeset 6466:eab04861f2fc HEAD

Don't assert-crash if trying to create mailbox prefix.
author Timo Sirainen <tss@iki.fi>
date Sat, 22 Sep 2007 17:05:25 +0300
parents da4867da38c2
children 7499e36629c6
files src/imap/cmd-create.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/cmd-create.c	Sat Sep 22 16:50:42 2007 +0300
+++ b/src/imap/cmd-create.c	Sat Sep 22 17:05:25 2007 +0300
@@ -23,7 +23,10 @@
 	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. */