From e18bb5ce6081efeb6bdcb6711ef9c0607f301e90 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 28 May 2010 12:27:58 +0100 Subject: [PATCH] doveadm force-resync: Get mailbox name as UTF-8. --HG-- branch : HEAD --- src/doveadm/doveadm-mail.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/doveadm/doveadm-mail.c b/src/doveadm/doveadm-mail.c index 1a644c30b8..51e207577a 100644 --- a/src/doveadm/doveadm-mail.c +++ b/src/doveadm/doveadm-mail.c @@ -4,9 +4,11 @@ #include "array.h" #include "lib-signals.h" #include "ioloop.h" +#include "str.h" #include "module-dir.h" #include "wildcard-match.h" #include "master-service.h" +#include "imap-utf7.h" #include "mail-user.h" #include "mail-namespace.h" #include "mail-storage.h" @@ -73,8 +75,13 @@ mailbox_find_and_open(struct mail_user *user, const char *mailbox) { struct mail_namespace *ns; struct mailbox *box; + string_t *str; const char *orig_mailbox = mailbox; + str = t_str_new(128); + if (imap_utf8_to_utf7(mailbox, str) == 0) + mailbox = str_c(str); + ns = mail_namespace_find(user->namespaces, &mailbox); if (ns == NULL) i_fatal("Can't find namespace for mailbox %s", mailbox); -- 2.47.3