From: Aki Tuomi Date: Tue, 29 May 2018 08:53:15 +0000 (+0300) Subject: pop3c: Ensure pop3c index directory is autocreated X-Git-Tag: 2.3.2.rc1~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e9693f1777cd9f516c5556c55298e8740a98220;p=thirdparty%2Fdovecot%2Fcore.git pop3c: Ensure pop3c index directory is autocreated Otherwise we might think that the box has been unexpectedly autodeleted and pop3_migration will fail. Broken by 91ee70ed04d33fecd7fc94621f236013d520d7b3 --- diff --git a/src/lib-storage/index/pop3c/pop3c-storage.c b/src/lib-storage/index/pop3c/pop3c-storage.c index 4f3f104a36..60c0816b3d 100644 --- a/src/lib-storage/index/pop3c/pop3c-storage.c +++ b/src/lib-storage/index/pop3c/pop3c-storage.c @@ -87,18 +87,15 @@ pop3c_client_create_from_set(struct mail_storage *storage, } static void -pop3c_storage_get_list_settings(const struct mail_namespace *ns, +pop3c_storage_get_list_settings(const struct mail_namespace *ns ATTR_UNUSED, struct mailbox_list_settings *set) { set->layout = MAILBOX_LIST_NAME_FS; if (set->root_dir != NULL && *set->root_dir != '\0' && set->index_dir == NULL) { - /* we don't really care about root_dir, but we - just need to get index_dir autocreated. - it happens when index_dir differs from root_dir. */ + /* we don't really care about root_dir, but we + just need to get index_dir autocreated. */ set->index_dir = set->root_dir; - set->root_dir = p_strconcat(ns->user->pool, - set->root_dir, "/.", NULL); } } @@ -115,6 +112,7 @@ pop3c_mailbox_alloc(struct mail_storage *storage, struct mailbox_list *list, mbox->box.pool = pool; mbox->box.storage = storage; mbox->box.list = list; + mbox->box.list->props |= MAILBOX_LIST_PROP_AUTOCREATE_DIRS; mbox->box.mail_vfuncs = &pop3c_mail_vfuncs; mbox->storage = POP3C_STORAGE(storage);