Skip to content

Commit

Permalink
pop3c: Ensure pop3c index directory is autocreated
Browse files Browse the repository at this point in the history
Otherwise we might think that the box has been unexpectedly
autodeleted and pop3_migration will fail.

Broken by 91ee70e
  • Loading branch information
cmouse committed May 29, 2018
1 parent 2311ab9 commit bd6265e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib-storage/index/pop3c/pop3c-storage.c
Expand Up @@ -92,18 +92,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);
}
}

Expand All @@ -120,6 +117,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);

Expand Down

0 comments on commit bd6265e

Please sign in to comment.