diff src/doveadm/doveadm-mail-mailbox-status.c @ 12629:02370eda76f8

lib-storage: Mailbox virtual names are now in UTF-8 format, not IMAP mUTF-7. Plugins that use mailbox names in configuration now take them also as UTF-8 rather than mUTF-7.
author Timo Sirainen <tss@iki.fi>
date Tue, 01 Feb 2011 20:41:54 +0200
parents 2c299c0e3bc8
children 447bce266022
line wrap: on
line diff
--- a/src/doveadm/doveadm-mail-mailbox-status.c	Tue Feb 01 20:37:17 2011 +0200
+++ b/src/doveadm/doveadm-mail-mailbox-status.c	Tue Feb 01 20:41:54 2011 +0200
@@ -4,7 +4,6 @@
 #include "str.h"
 #include "mail-namespace.h"
 #include "mail-storage.h"
-#include "imap-utf7.h"
 #include "doveadm-print.h"
 #include "doveadm-mail.h"
 #include "doveadm-mail-list-iter.h"
@@ -80,16 +79,8 @@
 			  const struct mailbox_status *status,
 			  const struct mailbox_metadata *metadata)
 {
-	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 (box != NULL)
+		doveadm_print(mailbox_get_vname(box));
 
 	if ((ctx->status_items & STATUS_MESSAGES) != 0)
 		doveadm_print_num(status->messages);
@@ -128,14 +119,8 @@
 	struct mailbox *box;
 	struct mailbox_status status;
 	struct mailbox_metadata metadata;
-	string_t *mailbox_name = t_str_new(128);
 
-	if (imap_utf7_to_utf8(info->name, mailbox_name) < 0) {
-		str_truncate(mailbox_name, 0);
-		str_append(mailbox_name, info->name);
-	}
-
-	box = doveadm_mailbox_find(ctx->ctx.cur_mail_user, str_c(mailbox_name));
+	box = doveadm_mailbox_find(ctx->ctx.cur_mail_user, info->name);
 	if (mailbox_get_status(box, ctx->status_items, &status) < 0 ||
 	    mailbox_get_metadata(box, ctx->metadata_items, &metadata) < 0) {
 		ctx->ctx.failed = TRUE;