|
@@ -2612,7 +2612,7 @@ imap_list_store( store_t *gctx, int flags,
|
|
imap_store_t *ctx = (imap_store_t *)gctx;
|
|
imap_store_t *ctx = (imap_store_t *)gctx;
|
|
struct imap_cmd_refcounted_state *sts = imap_refcounted_new_state( cb, aux );
|
|
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,
|
|
imap_exec( ctx, imap_refcounted_new_cmd( sts ), imap_refcounted_done_box,
|
|
"LIST \"\" \"%\\s*\"", ctx->prefix ) < 0) ||
|
|
"LIST \"\" \"%\\s*\"", ctx->prefix ) < 0) ||
|
|
((flags & LIST_INBOX) && (!(flags & LIST_PATH) || *ctx->prefix) &&
|
|
((flags & LIST_INBOX) && (!(flags & LIST_PATH) || *ctx->prefix) &&
|