From 1ee0aea6c64e26c651ceaef3f332f3ee03dcf34c Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Fri, 7 Aug 2009 23:07:35 +0200 Subject: [PATCH] Showed wrong folder name upon INBOX fallback. --- src/lib-sieve/sieve-actions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib-sieve/sieve-actions.c b/src/lib-sieve/sieve-actions.c index c1bdce0e2..8e71d4f68 100644 --- a/src/lib-sieve/sieve-actions.c +++ b/src/lib-sieve/sieve-actions.c @@ -186,7 +186,7 @@ static void act_store_get_storage_error } static struct mailbox *act_store_mailbox_open -(const struct sieve_action_exec_env *aenv, const char *name, +(const struct sieve_action_exec_env *aenv, const char **name, struct mail_namespace **ns_r) { struct mail_storage **storage = &(aenv->exec_status->last_storage); @@ -195,7 +195,7 @@ static struct mailbox *act_store_mailbox_open MAILBOX_FLAG_POST_SESSION; struct mailbox *box; enum mail_error error; - const char *folder = name; + const char *folder = *name; if (strcasecmp(folder, "INBOX") == 0) { /* Deliveries to INBOX must always succeed, regardless of ACLs */ @@ -212,7 +212,7 @@ static struct mailbox *act_store_mailbox_open /* delivering to a namespace prefix means we actually want to * deliver to the INBOX instead */ - folder = "INBOX"; + folder = *name = "INBOX"; flags |= MAILBOX_FLAG_IGNORE_ACLS; *ns_r = mail_namespace_find(aenv->scriptenv->namespaces, &folder); @@ -286,7 +286,7 @@ static bool act_store_start * to NULL. This implementation will then skip actually storing the message. */ if ( aenv->scriptenv->namespaces != NULL ) { - box = act_store_mailbox_open(aenv, ctx->folder, &ns); + box = act_store_mailbox_open(aenv, &ctx->folder, &ns); } /* Create transaction context */ -- GitLab