[dovecot-cvs] dovecot/src/lib-storage/index/cydir cydir-storage.c, 1.6, 1.7

tss at dovecot.org tss at dovecot.org
Fri Mar 30 21:32:08 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/cydir
In directory talvi:/tmp/cvs-serv29314/index/cydir

Modified Files:
	cydir-storage.c 
Log Message:
mailbox_open/create: Moved the mailbox name validation and error clearing
into common mail-storage.c



Index: cydir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/cydir/cydir-storage.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cydir-storage.c	30 Mar 2007 18:28:35 -0000	1.6
+++ cydir-storage.c	30 Mar 2007 18:32:01 -0000	1.7
@@ -220,8 +220,6 @@
 	const char *path;
 	struct stat st;
 
-	mail_storage_clear_error(_storage);
-
 	if (input != NULL) {
 		mail_storage_set_critical(_storage,
 			"cydir doesn't support streamed mailboxes");
@@ -231,11 +229,6 @@
 	if (strcmp(name, "INBOX") == 0)
 		return cydir_open(storage, "INBOX", flags);
 
-	if (!mailbox_list_is_valid_existing_name(_storage->list, name)) {
-		mail_storage_set_error(_storage, "Invalid mailbox name");
-		return NULL;
-	}
-
 	path = mailbox_list_get_path(_storage->list, name,
 				     MAILBOX_LIST_PATH_TYPE_MAILBOX);
 	if (stat(path, &st) == 0) {
@@ -258,13 +251,6 @@
 	const char *path;
 	struct stat st;
 
-	mail_storage_clear_error(_storage);
-
-	if (!mailbox_list_is_valid_create_name(_storage->list, name)) {
-		mail_storage_set_error(_storage, "Invalid mailbox name");
-		return -1;
-	}
-
 	path = mailbox_list_get_path(_storage->list, name,
 				     MAILBOX_LIST_PATH_TYPE_MAILBOX);
 	if (stat(path, &st) == 0) {



More information about the dovecot-cvs mailing list