[dovecot-cvs] dovecot/src/imap cmd-list.c,1.13,1.14
cras at procontrol.fi
cras at procontrol.fi
Mon Feb 17 18:40:18 EET 2003
Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv11083
Modified Files:
cmd-list.c
Log Message:
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)
Index: cmd-list.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-list.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cmd-list.c 11 Jan 2003 19:55:56 -0000 1.13
+++ cmd-list.c 17 Feb 2003 16:40:15 -0000 1.14
@@ -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;
+ /* 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, glob);
+ list_send(client, node->children, cmd, name, sep);
- 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);
- }
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);
}
More information about the dovecot-cvs
mailing list