From 41ed1012241c30c265109ca187bfe6751ed19828 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 18 Apr 2015 10:54:00 +0200 Subject: [PATCH] don't list IMAP Path under INBOX twice if NAMESPACE is "INBOX.", listing INBOX recursively will already include it. REFMAIL: 1890363108.1020695.1428757117731.JavaMail.yahoo@mail.yahoo.com --- src/drv_imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) &&