]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: LAYOUT=index doesn't reserve '~' as internal separator anymore.
authorTimo Sirainen <tss@iki.fi>
Thu, 16 Oct 2014 15:19:03 +0000 (08:19 -0700)
committerTimo Sirainen <tss@iki.fi>
Thu, 16 Oct 2014 15:19:03 +0000 (08:19 -0700)
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.

src/lib-storage/list/mailbox-list-index-backend.c

index 85f282f813a756ed98b80a254661341beb29e4d3..373769b410c50da6b62e3e14e83469ca404035bc 100644 (file)
@@ -60,9 +60,10 @@ static void index_list_deinit(struct mailbox_list *_list)
        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