]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
virtual: Fixed looking up namespace for save-destination mailbox (!ns/box)
authorTimo Sirainen <tss@iki.fi>
Tue, 1 Jun 2010 16:08:13 +0000 (17:08 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 1 Jun 2010 16:08:13 +0000 (17:08 +0100)
--HG--
branch : HEAD

src/plugins/virtual/virtual-config.c

index f7e9dec1bd5aeb3e787afaffc14c415aad6fcf7c..fa179d9b4e808cf369e3fb208fb5c31a6ce6a468 100644 (file)
@@ -131,10 +131,10 @@ virtual_config_parse_line(struct virtual_parse_context *ctx, const char *line,
        if (strcasecmp(line, "INBOX") == 0)
                line = "INBOX";
        bbox->name = p_strdup(ctx->pool, line);
-       if (*line == '-') line++;
-       bbox->ns = strcasecmp(line, "!INBOX") != 0 ?
-               mail_namespace_find(user->namespaces, &line) :
-               mail_namespace_find_inbox(user->namespaces);
+       if (*line == '-' || *line == '!') line++;
+       bbox->ns = strcasecmp(line, "INBOX") == 0 ?
+               mail_namespace_find_inbox(user->namespaces) :
+               mail_namespace_find(user->namespaces, &line);
        if (bbox->ns == NULL) {
                *error_r = t_strdup_printf("Namespace not found for %s",
                                           bbox->name);