From: Timo Sirainen Date: Sun, 27 Jul 2003 05:52:01 +0000 (+0300) Subject: A bit more temporary kludging X-Git-Tag: 1.1.alpha1~4449 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3cc73406454e17500cd03b20c73931f6763a020;p=thirdparty%2Fdovecot%2Fcore.git A bit more temporary kludging --HG-- branch : HEAD --- diff --git a/src/imap/cmd-list.c b/src/imap/cmd-list.c index 0366d46386..b85ab3e7bc 100644 --- a/src/imap/cmd-list.c +++ b/src/imap/cmd-list.c @@ -93,6 +93,7 @@ static int parse_list_flags(struct client *client, struct imap_arg *args, int _cmd_list_full(struct client *client, int lsub) { + struct namespace *ns; struct mail_storage *storage; struct imap_arg *args; enum mailbox_list_flags list_flags; @@ -100,19 +101,6 @@ int _cmd_list_full(struct client *client, int lsub) char sep_chr, sep[3]; int failed, listext; - /* FIXME: really needs some work.. */ - storage = client->namespaces->storage; - - sep_chr = storage->hierarchy_sep; - if (sep_chr == '"' || sep_chr == '\\') { - sep[0] = '\\'; - sep[1] = sep_chr; - sep[2] = '\0'; - } else { - sep[0] = sep_chr; - sep[1] = '\0'; - } - /* [()] */ if (!client_read_args(client, 0, 0, &args)) return FALSE; @@ -140,6 +128,23 @@ int _cmd_list_full(struct client *client, int lsub) return TRUE; } + /* FIXME: really needs some work.. */ + ns = namespace_find(client->namespaces, mask); + if (ns != NULL) + storage = ns->storage; + else + storage = client->namespaces->storage; + + sep_chr = storage->hierarchy_sep; + if (sep_chr == '"' || sep_chr == '\\') { + sep[0] = '\\'; + sep[1] = sep_chr; + sep[2] = '\0'; + } else { + sep[0] = sep_chr; + sep[1] = '\0'; + } + if (*mask == '\0' && !lsub) { /* special request to return the hierarchy delimiter */ client_send_line(client, t_strconcat(