dovecot-1.2: Maildir++ layout: Allow selecting namespace prefix ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 16 02:49:02 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/7364e19b703e
changeset: 8948:7364e19b703e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 15 19:47:20 2009 -0400
description:
Maildir++ layout: Allow selecting namespace prefix if inbox=no.
With Maildir this allows opening the "mailbox root" (i.e. INBOX).

diffstat:

1 file changed, 7 insertions(+)
src/lib-storage/list/mailbox-list-maildir.c |    7 +++++++

diffs (17 lines):

diff -r 71ee47b69bc7 -r 7364e19b703e src/lib-storage/list/mailbox-list-maildir.c
--- a/src/lib-storage/list/mailbox-list-maildir.c	Wed Apr 15 18:06:21 2009 -0400
+++ b/src/lib-storage/list/mailbox-list-maildir.c	Wed Apr 15 19:47:20 2009 -0400
@@ -133,6 +133,13 @@ maildir_is_valid_existing_name(struct ma
 maildir_is_valid_existing_name(struct mailbox_list *list, const char *name)
 {
 	size_t len;
+
+	if (*name == '\0' && *list->ns->prefix != '\0' &&
+	    (list->ns->flags & NAMESPACE_FLAG_INBOX) == 0) {
+		/* an ugly way to get to Maildir/ root when it's not the
+		   INBOX. */
+		return TRUE;
+	}
 
 	if (!maildir_list_is_valid_common(list, name, &len))
 		return FALSE;


More information about the dovecot-cvs mailing list