dovecot-2.2: lib-storage: LAYOUT=index doesn't reserve '~' as in...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 16 15:19:52 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/30b84781a363
changeset: 17960:30b84781a363
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 16 08:19:03 2014 -0700
description:
lib-storage: LAYOUT=index doesn't reserve '~' as internal separator anymore.
The index doesn't reserve any character as hierarchy separator, so the
internal separator can change at any time. Use the namespace's configured
hierarchy separator as the internal separator to avoid reserving any
characters. If namespace separator isn't configured, fallback to the
original '~' so this change shouldn't break anything.

diffstat:

 src/lib-storage/list/mailbox-list-index-backend.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 470ec616ba74 -r 30b84781a363 src/lib-storage/list/mailbox-list-index-backend.c
--- a/src/lib-storage/list/mailbox-list-index-backend.c	Thu Oct 16 07:25:17 2014 -0700
+++ b/src/lib-storage/list/mailbox-list-index-backend.c	Thu Oct 16 08:19:03 2014 -0700
@@ -60,9 +60,10 @@
 	pool_unref(&list->list.pool);
 }
 
-static char index_list_get_hierarchy_sep(struct mailbox_list *list ATTR_UNUSED)
+static char index_list_get_hierarchy_sep(struct mailbox_list *list)
 {
-	return MAILBOX_LIST_INDEX_HIERARHCY_SEP;
+	return *list->ns->set->separator != '\0' ? *list->ns->set->separator :
+		MAILBOX_LIST_INDEX_HIERARHCY_SEP;
 }
 
 static int


More information about the dovecot-cvs mailing list