]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm mailbox status: Show mailbox name in UTF8 in output.
authorTimo Sirainen <tss@iki.fi>
Thu, 22 Jul 2010 15:46:48 +0000 (16:46 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 22 Jul 2010 15:46:48 +0000 (16:46 +0100)
src/doveadm/doveadm-mail-mailbox-status.c

index cf2eecc80b6a5dfe35832d40f0295dc03d11b049..4e28e7853c067ad2c96210166cc51d21bb207572 100644 (file)
@@ -72,8 +72,16 @@ static void status_output(struct status_cmd_context *ctx, struct mailbox *box,
                          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);