Skip to content

Commit

Permalink
Can also skip aliased mailboxes, since we only need to process the ph…
Browse files Browse the repository at this point in the history
…ysical mailbox once
  • Loading branch information
slusarz committed Feb 24, 2024
1 parent a40e7c5 commit 9d02ebb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fts-backend-flatcurve.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,15 +487,16 @@ fts_backend_flatcurve_iterate_ns(struct fts_backend *_backend,
struct mailbox_list_iterate_context *iter;
const enum mailbox_list_iter_flags iter_flags =
MAILBOX_LIST_ITER_NO_AUTO_BOXES |
MAILBOX_LIST_ITER_RETURN_NO_FLAGS;
MAILBOX_LIST_ITER_RETURN_NO_FLAGS |
MAILBOX_LIST_ITER_SKIP_ALIASES;
enum mailbox_flags mbox_flags = 0;
pool_t pool;
bool pool_alloc = FALSE;

iter = mailbox_list_iter_init(_backend->ns->list, "*", iter_flags);
while ((info = mailbox_list_iter_next(iter)) != NULL) {
if ((info->flags & (MAILBOX_NOSELECT | MAILBOX_NONEXISTENT)) != 0)
continue;
continue;

box = mailbox_alloc(backend->backend.ns->list, info->vname,
mbox_flags);
Expand Down

0 comments on commit 9d02ebb

Please sign in to comment.