diff --git a/src/drv_imap.c b/src/drv_imap.c index 2961769..7b41864 100644 --- a/src/drv_imap.c +++ b/src/drv_imap.c @@ -2612,7 +2612,7 @@ imap_list_store( store_t *gctx, int flags, imap_store_t *ctx = (imap_store_t *)gctx; struct imap_cmd_refcounted_state *sts = imap_refcounted_new_state( cb, aux ); - if (((flags & LIST_PATH) && + if (((flags & LIST_PATH) && (!(flags & LIST_INBOX) || !is_inbox( ctx, ctx->prefix, -1 )) && imap_exec( ctx, imap_refcounted_new_cmd( sts ), imap_refcounted_done_box, "LIST \"\" \"%\\s*\"", ctx->prefix ) < 0) || ((flags & LIST_INBOX) && (!(flags & LIST_PATH) || *ctx->prefix) &&