struct imapc_mailbox_list *list = (struct imapc_mailbox_list *)_list;
char sep;
- if (imapc_list_try_get_root_sep(list, &sep) < 0) {
- /* we can't really fail here. just return a common separator
- and keep failing all list commands until it succeeds. */
+ if (list->root_sep_lookup_failed ||
+ imapc_list_try_get_root_sep(list, &sep) < 0) {
+ /* we can't really return a failure here. just return a common
+ separator and fail all the future list operations. */
+ list->root_sep_lookup_failed = TRUE;
return '/';
}
return sep;
struct mailbox_node *node;
const char *pattern;
+ if (list->root_sep_lookup_failed) {
+ mailbox_list_set_internal_error(&list->list);
+ return -1;
+ }
if (list->refreshed_mailboxes)
return 0;
i_assert(src_list->tmp_subscriptions == NULL);
+ if (src_list->root_sep_lookup_failed) {
+ mailbox_list_set_internal_error(_src_list);
+ return -1;
+ }
+
if (src_list->refreshed_subscriptions) {
if (dest_list->subscriptions == NULL)
dest_list->subscriptions = mailbox_tree_init(dest_sep);
unsigned int refreshed_mailboxes_recently:1;
unsigned int index_list_failed:1;
unsigned int root_sep_pending:1;
+ unsigned int root_sep_lookup_failed:1;
};
int imapc_list_get_mailbox_flags(struct mailbox_list *list, const char *name,