dovecot-1.3: Maildir++ layout: Allow selecting namespace prefix ...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Thu Apr 16 02:49:12 EEST 2009
    
    
  
details:   http://hg.dovecot.org/dovecot-1.3/rev/8ea3e0549b5a
changeset: 9111:8ea3e0549b5a
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 def8b99b1a02 -r 8ea3e0549b5a 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