[dovecot-cvs] dovecot/src/lib-storage mailbox-list.c,1.11,1.12

tss at dovecot.org tss at dovecot.org
Fri Mar 30 22:36:21 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv31804

Modified Files:
	mailbox-list.c 
Log Message:
cleanup



Index: mailbox-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mailbox-list.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mailbox-list.c	30 Mar 2007 19:35:07 -0000	1.11
+++ mailbox-list.c	30 Mar 2007 19:36:19 -0000	1.12
@@ -257,6 +257,10 @@
 		mailbox_list_set_error(list, "Invalid mailbox name");
 		return -1;
 	}
+	if (strcmp(name, "INBOX") == 0) {
+		mailbox_list_set_error(list, "INBOX can't be deleted.");
+		return -1;
+	}
 	return list->v.delete_mailbox(list, name);
 }
 
@@ -277,16 +281,6 @@
 {
 	const char *path, *index_dir, *dir;
 
-	if (strcmp(name, "INBOX") == 0) {
-		mailbox_list_set_error(list, "INBOX can't be deleted.");
-		return -1;
-	}
-
-	if (!mailbox_list_is_valid_existing_name(list, name)) {
-		mailbox_list_set_error(list, "Invalid mailbox name");
-		return -1;
-	}
-
 	path = mailbox_list_get_path(list, name,
 				     MAILBOX_LIST_PATH_TYPE_MAILBOX);
 



More information about the dovecot-cvs mailing list