Mercurial > dovecot > core-2.2
changeset 1183:cacfd1b16626 HEAD
Remove the mailbox globbing code from here. It should have been done
already by mail_storage. Also show parent mailboxes before children, not
after. (Patch by Peter Kaas)
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 17 Feb 2003 18:40:15 +0200 |
parents | 27fb52c532a4 |
children | 0dc579b99c9e |
files | src/imap/cmd-list.c |
diffstat | 1 files changed, 10 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-list.c Mon Feb 17 16:57:23 2003 +0200 +++ b/src/imap/cmd-list.c Mon Feb 17 18:40:15 2003 +0200 @@ -3,7 +3,6 @@ #include "common.h" #include "strescape.h" #include "commands.h" -#include "imap-match.h" struct list_node { struct list_node *next; @@ -92,8 +91,7 @@ } static void list_send(struct client *client, struct list_node *node, - const char *cmd, const char *path, const char *sep, - struct imap_match_glob *glob) + const char *cmd, const char *path, const char *sep) { const char *name, *str; @@ -108,17 +106,15 @@ else name = node->name; - if (node->children != NULL) - list_send(client, node->children, cmd, name, sep, glob); + /* node->name should already be escaped */ + str = t_strdup_printf("* %s (%s) \"%s\" \"%s\"", cmd, + mailbox_flags2str(node->flags), + sep, name); + client_send_line(client, str); - if ((node->flags & MAILBOX_NOSELECT) == 0 || - imap_match(glob, name) > 0) { - /* node->name should already be escaped */ - str = t_strdup_printf("* %s (%s) \"%s\" \"%s\"", cmd, - mailbox_flags2str(node->flags), - sep, name); - client_send_line(client, str); - } + if (node->children != NULL) + list_send(client, node->children, cmd, name, sep); + t_pop(); } } @@ -182,8 +178,7 @@ if (!failed) { list_send(client, ctx.nodes, - subscribed ? "LSUB" : "LIST", NULL, sep, - imap_match_init(pattern, TRUE, sep_chr)); + subscribed ? "LSUB" : "LIST", NULL, sep); } pool_unref(ctx.pool); }