dovecot-1.1: maildir -> dbox conversion: Create the destination ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 2 16:23:54 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/40a660972c70
changeset: 7586:40a660972c70
user: Timo Sirainen <tss at iki.fi>
date: Mon Jun 02 16:23:50 2008 +0300
description:
maildir -> dbox conversion: Create the destination mailbox so the conversion
won't fail with rename() error.
diffstat:
1 file changed, 9 insertions(+)
src/plugins/convert/convert-storage.c | 9 +++++++++
diffs (19 lines):
diff -r 326ca0ed8983 -r 40a660972c70 src/plugins/convert/convert-storage.c
--- a/src/plugins/convert/convert-storage.c Mon Jun 02 16:19:54 2008 +0300
+++ b/src/plugins/convert/convert-storage.c Mon Jun 02 16:23:50 2008 +0300
@@ -146,6 +146,15 @@ static int mailbox_convert_maildir_to_db
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);
More information about the dovecot-cvs
mailing list