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

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


details:   http://hg.dovecot.org/dovecot-1.2/rev/508bbbd4e6f6
changeset: 8949:508bbbd4e6f6
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 7364e19b703e -r 508bbbd4e6f6 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
@@ -288,13 +288,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