Skip to content

Commit

Permalink
imapc: Don't duplicate standard mailbox flags in LIST replies.
Browse files Browse the repository at this point in the history
We added the standard \NoSelect, \NonExistent, \NoInferiors and \Subscribed
to special_use string, which caused them to be sent duplicated.
  • Loading branch information
sirainen committed Jan 14, 2016
1 parent 27f174f commit be3b937
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-storage/index/imapc/imapc-list.c
Expand Up @@ -660,7 +660,8 @@ imapc_list_write_special_use(struct imapc_mailbox_list_iterate_context *ctx,
str_truncate(ctx->special_use, 0);

for (i = 0; i < N_ELEMENTS(imap_list_flags); i++) {
if ((node->flags & imap_list_flags[i].flag) != 0) {
if ((node->flags & imap_list_flags[i].flag) != 0 &&
(node->flags & MAILBOX_SPECIALUSE_MASK) != 0) {
str_append(ctx->special_use, imap_list_flags[i].str);
str_append_c(ctx->special_use, ' ');
}
Expand Down
1 change: 1 addition & 0 deletions src/lib-storage/mailbox-list.h
Expand Up @@ -59,6 +59,7 @@ enum mailbox_info_flags {
MAILBOX_SPECIALUSE_SENT = 0x00200000,
MAILBOX_SPECIALUSE_TRASH = 0x00400000,
MAILBOX_SPECIALUSE_IMPORTANT = 0x00800000,
#define MAILBOX_SPECIALUSE_MASK 0x00ff0000

/* Internally used by lib-storage: */
MAILBOX_SELECT = 0x20000000,
Expand Down

0 comments on commit be3b937

Please sign in to comment.