comparison src/lib-storage/list/mailbox-list-maildir-iter.c @ 9627:8c8bde0f9120 HEAD

lib-storage: Maildir++ mailbox listing could have given wrong flags to parent mailboxes.
author Timo Sirainen <tss@iki.fi>
date Tue, 02 Nov 2010 19:23:37 +0000
parents 00cd9aacd03c
children
comparison
equal deleted inserted replaced
9626:ec7ce2647131 9627:8c8bde0f9120
36 } 36 }
37 37
38 static void 38 static void
39 maildir_fill_parents(struct maildir_list_iterate_context *ctx, 39 maildir_fill_parents(struct maildir_list_iterate_context *ctx,
40 struct imap_match_glob *glob, bool update_only, 40 struct imap_match_glob *glob, bool update_only,
41 string_t *mailbox, enum mailbox_info_flags flags) 41 string_t *mailbox)
42 { 42 {
43 struct mail_namespace *ns = ctx->ctx.list->ns; 43 struct mail_namespace *ns = ctx->ctx.list->ns;
44 struct mailbox_node *node; 44 struct mailbox_node *node;
45 const char *p, *mailbox_c; 45 const char *p, *mailbox_c;
46 char hierarchy_sep; 46 char hierarchy_sep;
79 but we might see it later */ 79 but we might see it later */
80 node->flags = MAILBOX_NONEXISTENT; 80 node->flags = MAILBOX_NONEXISTENT;
81 } 81 }
82 if (!update_only) 82 if (!update_only)
83 node->flags |= MAILBOX_MATCHED; 83 node->flags |= MAILBOX_MATCHED;
84 node->flags |= MAILBOX_CHILDREN | flags; 84 node->flags |= MAILBOX_CHILDREN;
85 node->flags &= ~MAILBOX_NOCHILDREN; 85 node->flags &= ~MAILBOX_NOCHILDREN;
86 node_fix_parents(node); 86 node_fix_parents(node);
87 } 87 }
88 } 88 }
89 } 89 }
200 MAILBOX_CHILDREN | MAILBOX_NOCHILDREN); 200 MAILBOX_CHILDREN | MAILBOX_NOCHILDREN);
201 201
202 if ((match & IMAP_MATCH_PARENT) != 0) { 202 if ((match & IMAP_MATCH_PARENT) != 0) {
203 T_BEGIN { 203 T_BEGIN {
204 maildir_fill_parents(ctx, glob, update_only, 204 maildir_fill_parents(ctx, glob, update_only,
205 mailbox, flags); 205 mailbox);
206 } T_END; 206 } T_END;
207 } else { 207 } else {
208 created = FALSE; 208 created = FALSE;
209 node = update_only ? 209 node = update_only ?
210 mailbox_tree_lookup(ctx->tree_ctx, 210 mailbox_tree_lookup(ctx->tree_ctx,