Mercurial > dovecot > original-hg > dovecot-1.2
diff src/plugins/convert/convert-tool.c @ 4860:87ae4d41bc10 HEAD
Create storages with MAIL_STORAGE_FLAG_NO_AUTOCREATE flag so we don't keep
recreating the old storage and converting it all the time. Also added
convert_skip_broken_mailboxes flag.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 03 Dec 2006 15:35:18 +0200 |
parents | 5255476a24b5 |
children | 6ab2712f1a93 |
line wrap: on
line diff
--- a/src/plugins/convert/convert-tool.c Sun Dec 03 15:29:56 2006 +0200 +++ b/src/plugins/convert/convert-tool.c Sun Dec 03 15:35:18 2006 +0200 @@ -7,6 +7,8 @@ #include "mail-storage.h" #include "convert-storage.h" +#include <stdlib.h> + int main(int argc, const char *argv[]) { struct ioloop *ioloop; @@ -20,12 +22,14 @@ if (argc <= 4) { i_fatal("Usage: <username> <home dir> " - "<source mail env> <dest mail env>"); + "<source mail env> <dest mail env> " + "[<1=skip broken mailboxes>]"); } ioloop = io_loop_create(system_pool); - ret = convert_storage(argv[1], argv[2], argv[3], argv[4]); + ret = convert_storage(argv[1], argv[2], argv[3], argv[4], + argv[5] != NULL && atoi(argv[5]) == 1); if (ret > 0) i_info("Successfully converted"); else if (ret == 0)