]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Only send NIL on GETMETADATA when query depth is 0
authorMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Fri, 9 Aug 2019 11:07:58 +0000 (14:07 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:02:16 +0000 (10:02 +0300)
src/imap/cmd-getmetadata.c

index 641057c389f36582159c885f0a22a4f8101faaa8..3a789adee0f6a0d9fec4328d8672b656df2349c9 100644 (file)
@@ -301,7 +301,8 @@ cmd_getmetadata_send_entry_tree(struct imap_getmetadata_context *ctx,
                } while (ctx->depth == 1 && strchr(subentry, '/') != NULL);
                entry = t_strconcat(str_c(ctx->iter_entry_prefix), subentry, NULL);
        }
-       cmd_getmetadata_send_entry(ctx, entry, ctx->iter == NULL);
+       /* send NIL only on depth 0 query */
+       cmd_getmetadata_send_entry(ctx, entry, ctx->depth == 0);
 
        if (ctx->cur_stream != NULL) {
                if (!cmd_getmetadata_stream_continue(ctx))