[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.84, 1.85

cras at dovecot.org cras at dovecot.org
Fri Jul 9 21:31:28 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv5571/lib-storage/index/mbox

Modified Files:
	mbox-storage.c 
Log Message:
Never treat "mailbox/" as a valid mailbox name.



Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- mbox-storage.c	4 Jul 2004 20:11:04 -0000	1.84
+++ mbox-storage.c	9 Jul 2004 18:31:26 -0000	1.85
@@ -329,7 +329,10 @@
 
 static int mbox_is_valid_existing_name(const char *name)
 {
-	if (name[0] == '\0')
+	size_t len;
+
+	len = strlen(name);
+	if (name[0] == '\0' || name[len-1] == '/')
 		return FALSE;
 
 	return mbox_is_valid_mask(name);



More information about the dovecot-cvs mailing list