]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
A bit more temporary kludging
authorTimo Sirainen <tss@iki.fi>
Sun, 27 Jul 2003 05:52:01 +0000 (08:52 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 27 Jul 2003 05:52:01 +0000 (08:52 +0300)
--HG--
branch : HEAD

src/imap/cmd-list.c

index 0366d4638602074d7eaa3a1cf495803efaf516aa..b85ab3e7bcd9c962d6095129071a317f2bb639fa 100644 (file)
@@ -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';
-       }
-
        /* [(<options>)] <reference> <mailbox wildcards> */
        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(