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.
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