Mercurial > dovecot > original-hg > dovecot-1.2
changeset 5617:a0310d7b6971 HEAD
Fixes for INDEX=MEMORY
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 13 May 2007 21:07:05 +0300 |
parents | 0d6cd7281aa7 |
children | 5ea33dbddbae |
files | src/lib-storage/list/index-mailbox-list.c src/lib-storage/mailbox-list.c |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/list/index-mailbox-list.c Sun May 13 20:33:00 2007 +0300 +++ b/src/lib-storage/list/index-mailbox-list.c Sun May 13 21:07:05 2007 +0300 @@ -456,7 +456,8 @@ const char *dir; /* FIXME: for now we only work with maildir++ */ - if (getenv("MAILBOX_LIST_INDEX_DISABLE") != NULL || + dir = mailbox_list_get_path(list, NULL, MAILBOX_LIST_PATH_TYPE_INDEX); + if (*dir == '\0' || getenv("MAILBOX_LIST_INDEX_DISABLE") != NULL || strcmp(list->name, "maildir++") != 0) { /* reserve the module context anyway, so syncing code knows that the index is disabled */ @@ -473,7 +474,6 @@ list->v.iter_next = index_mailbox_list_iter_next; MODULE_CONTEXT_SET(list, index_mailbox_list_module, ilist); - dir = mailbox_list_get_path(list, NULL, MAILBOX_LIST_PATH_TYPE_INDEX); ilist->mail_index = mail_index_alloc(dir, MAIL_INDEX_PREFIX); /* sync_init allocates the extensions. do it here before opening the
--- a/src/lib-storage/mailbox-list.c Sun May 13 20:33:00 2007 +0300 +++ b/src/lib-storage/mailbox-list.c Sun May 13 21:07:05 2007 +0300 @@ -111,7 +111,8 @@ strcmp(set->control_dir, set->root_dir) == 0 ? NULL : p_strdup(list->pool, set->control_dir); - if (list->set.index_dir != NULL) { + if (list->set.index_dir != NULL && + *list->set.index_dir != '\0') { if (mkdir_parents(list->set.index_dir, 0700) < 0 && errno != EEXIST) i_error("mkdir(%s) failed: %m", list->set.index_dir);