From 6be7148f26de26e4eebd69265147c44e169fdf83 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 2 Jun 2008 16:23:50 +0300 Subject: [PATCH] maildir -> dbox conversion: Create the destination mailbox so the conversion won't fail with rename() error. --HG-- branch : HEAD --- src/plugins/convert/convert-storage.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/convert/convert-storage.c b/src/plugins/convert/convert-storage.c index 89ddd21646..138987f54f 100644 --- a/src/plugins/convert/convert-storage.c +++ b/src/plugins/convert/convert-storage.c @@ -146,6 +146,15 @@ static int mailbox_convert_maildir_to_dbox(struct mail_storage *src_storage, bool t; int ret; + /* create as non-selectable mailbox so the dbox-Mails directory + isn't created yet */ + if (mail_storage_mailbox_create(dest_storage, dest_name, TRUE) < 0) { + i_error("Mailbox conversion: " + "Couldn't create mailbox %s: %s", + dest_name, storage_error(dest_storage)); + return -1; + } + src_path = mail_storage_get_mailbox_path(src_storage, src_name, &t); dest_path = mail_storage_get_mailbox_path(dest_storage, dest_name, &t); -- 2.47.3