[dovecot-cvs] dovecot/src/imap cmd-create.c,1.9,1.10

cras at dovecot.org cras at dovecot.org
Sat Sep 4 18:03:48 EEST 2004


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv1377

Modified Files:
	cmd-create.c 
Log Message:
CREATE was broken if namespace prefixes were set. Patch by Andreas Fuchs.



Index: cmd-create.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-create.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cmd-create.c	22 Jul 2004 21:20:00 -0000	1.9
+++ cmd-create.c	4 Sep 2004 15:03:46 -0000	1.10
@@ -6,13 +6,14 @@
 int cmd_create(struct client *client)
 {
 	struct mail_storage *storage;
-	const char *mailbox;
+	const char *mailbox, *full_mailbox;
 	int directory;
 	size_t len;
 
 	/* <mailbox> */
 	if (!client_read_string_args(client, 1, &mailbox))
 		return FALSE;
+	full_mailbox = mailbox;
 
 	storage = client_find_storage(client, &mailbox);
 	if (storage == NULL)
@@ -29,7 +30,7 @@
 		mailbox = t_strndup(mailbox, len-1);
 	}
 
-	if (!client_verify_mailbox_name(client, mailbox, FALSE, TRUE))
+	if (!client_verify_mailbox_name(client, full_mailbox, FALSE, TRUE))
 		return TRUE;
 
 	if (mail_storage_mailbox_create(storage, mailbox, directory) < 0)



More information about the dovecot-cvs mailing list