Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8269:399bf5883beb HEAD
Virtual mailboxes: Configuration parsing fix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 12 Oct 2008 14:47:51 +0300 |
parents | eb320fbb87f0 |
children | 3a579de74dae |
files | src/plugins/virtual/virtual-config.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/virtual/virtual-config.c Sun Oct 12 14:40:57 2008 +0300 +++ b/src/plugins/virtual/virtual-config.c Sun Oct 12 14:47:51 2008 +0300 @@ -106,8 +106,12 @@ str_append(ctx->rule, line); return 0; } - if (virtual_config_add_rule(ctx, error_r) < 0) - return -1; + /* if there is no rule yet, it means we want the previous mailboxes + to use the rule that comes later */ + if (str_len(ctx->rule) > 0) { + if (virtual_config_add_rule(ctx, error_r) < 0) + return -1; + } /* new mailbox. the search args are added to it later. */ bbox = p_new(ctx->pool, struct virtual_backend_box, 1);