dovecot-1.3: virtual: Return original mailbox names with namespa...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 16 02:49:13 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/2ba85232848e
changeset: 9112:2ba85232848e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Apr 15 19:48:17 2009 -0400
description:
virtual: Return original mailbox names with namespace prefix.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/plugins/virtual/virtual-mail.c |    7 +++++--

diffs (22 lines):

diff -r 8ea3e0549b5a -r 2ba85232848e src/plugins/virtual/virtual-mail.c
--- a/src/plugins/virtual/virtual-mail.c	Wed Apr 15 19:47:20 2009 -0400
+++ b/src/plugins/virtual/virtual-mail.c	Wed Apr 15 19:48:17 2009 -0400
@@ -292,13 +292,16 @@ virtual_mail_get_special(struct mail *ma
 			 const char **value_r)
 {
 	struct virtual_mail *vmail = (struct virtual_mail *)mail;
+	struct mailbox *box = vmail->backend_mail->box;
 
 	if (field == MAIL_FETCH_MAILBOX_NAME) {
-		*value_r = vmail->backend_mail->box->name;
+		*value_r = p_strconcat(vmail->imail.data_pool,
+				       box->storage->ns->prefix,
+				       box->name, NULL);
 		return 0;
 	}
 	if (mail_get_special(vmail->backend_mail, field, value_r) < 0) {
-		virtual_box_copy_error(mail->box, vmail->backend_mail->box);
+		virtual_box_copy_error(mail->box, box);
 		return -1;
 	}
 	return 0;


More information about the dovecot-cvs mailing list