dovecot-2.0: doveadm mailbox status: Show mailbox name in UTF8 i...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jul 22 18:46:51 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/93aee2609041
changeset: 11886:93aee2609041
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jul 22 16:46:48 2010 +0100
description:
doveadm mailbox status: Show mailbox name in UTF8 in output.

diffstat:

 src/doveadm/doveadm-mail-mailbox-status.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r f4c8ca0bfd6d -r 93aee2609041 src/doveadm/doveadm-mail-mailbox-status.c
--- a/src/doveadm/doveadm-mail-mailbox-status.c	Thu Jul 22 16:43:36 2010 +0100
+++ b/src/doveadm/doveadm-mail-mailbox-status.c	Thu Jul 22 16:46:48 2010 +0100
@@ -72,8 +72,16 @@
 			  const struct mailbox_status *status,
 			  uint8_t mailbox_guid[MAIL_GUID_128_SIZE])
 {
-	if (box != NULL)
-		doveadm_print(mailbox_get_vname(box));
+	string_t *name;
+
+	if (box != NULL) {
+		name = t_str_new(128);
+		if (imap_utf7_to_utf8(mailbox_get_vname(box), name) < 0) {
+			str_truncate(name, 0);
+			str_append(name, mailbox_get_vname(box));
+		}
+		doveadm_print(str_c(name));
+	}
 
 	if ((ctx->items & STATUS_MESSAGES) != 0)
 		doveadm_print_num(status->messages);


More information about the dovecot-cvs mailing list