dovecot: Namespace with empty prefix can have list=yes also

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 28 01:52:04 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/9f2a94a226f4
changeset: 5817:9f2a94a226f4
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 28 00:03:59 2007 +0300
description:
Namespace with empty prefix can have list=yes also

diffstat:

1 file changed, 3 insertions(+), 2 deletions(-)
src/lib-storage/mail-namespace.c |    5 +++--

diffs (22 lines):

diff -r e3693a057962 -r 9f2a94a226f4 src/lib-storage/mail-namespace.c
--- a/src/lib-storage/mail-namespace.c	Wed Jun 27 23:23:15 2007 +0300
+++ b/src/lib-storage/mail-namespace.c	Thu Jun 28 00:03:59 2007 +0300
@@ -41,7 +41,7 @@ namespace_add_env(pool_t pool, const cha
 		ns->flags |= NAMESPACE_FLAG_INBOX;
 	if (getenv(t_strdup_printf("NAMESPACE_%u_HIDDEN", num)) != NULL)
 		ns->flags |= NAMESPACE_FLAG_HIDDEN;
-	if ((ns->flags & NAMESPACE_FLAG_HIDDEN) == 0 && *prefix != '\0' &&
+	if ((ns->flags & NAMESPACE_FLAG_HIDDEN) == 0 &&
 	    getenv(t_strdup_printf("NAMESPACE_%u_LIST", num)) != NULL)
 		ns->flags |= NAMESPACE_FLAG_LIST;
 
@@ -101,7 +101,8 @@ static bool namespaces_check(struct mail
 			private_ns = ns;
 			private_ns_count++;
 		}
-		if ((ns->flags & NAMESPACE_FLAG_LIST) != 0 &&
+		if (*ns->prefix != '\0' &&
+		    (ns->flags & NAMESPACE_FLAG_LIST) != 0 &&
 		    ns->prefix[strlen(ns->prefix)-1] != ns->sep) {
 			i_error("namespace configuration error: "
 				"list=yes requires prefix=%s "


More information about the dovecot-cvs mailing list