Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1657:a85af58a363c HEAD
A bit more temporary kludging
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 27 Jul 2003 08:52:01 +0300 |
parents | 6025913b581b |
children | 20519e4bca48 |
files | src/imap/cmd-list.c |
diffstat | 1 files changed, 18 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-list.c Sun Jul 27 08:37:58 2003 +0300 +++ b/src/imap/cmd-list.c Sun Jul 27 08:52:01 2003 +0300 @@ -93,6 +93,7 @@ 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 @@ 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'; - } - /* [(<options>)] <reference> <mailbox wildcards> */ if (!client_read_args(client, 0, 0, &args)) return FALSE; @@ -140,6 +128,23 @@ 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(