Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6248:c6b1d8515354 HEAD
Added MAILBOX_LIST_FLAG_MAILBOX_FILES flag. If it's set and INBOX path is
set, point index and control directories under the root directory instead.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 09 Aug 2007 19:03:18 +0300 |
parents | d9b07b5eea4a |
children | 2ebca5088938 |
files | src/lib-storage/index/mbox/mbox-storage.c src/lib-storage/list/mailbox-list-fs.c src/lib-storage/mailbox-list.h |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-storage.c Thu Aug 09 18:50:56 2007 +0300 +++ b/src/lib-storage/index/mbox/mbox-storage.c Thu Aug 09 19:03:18 2007 +0300 @@ -433,7 +433,8 @@ list_set.lock_method = &_storage->lock_method; if (mailbox_list_init(_storage->ns, layout, &list_set, - mail_storage_get_list_flags(_storage->flags), + mail_storage_get_list_flags(_storage->flags) | + MAILBOX_LIST_FLAG_MAILBOX_FILES, &_storage->list, error_r) < 0) return -1;
--- a/src/lib-storage/list/mailbox-list-fs.c Thu Aug 09 18:50:56 2007 +0300 +++ b/src/lib-storage/list/mailbox-list-fs.c Thu Aug 09 19:03:18 2007 +0300 @@ -189,7 +189,11 @@ break; } - if (strcmp(name, "INBOX") == 0 && set->inbox_path != NULL) + /* If INBOX is a file, index and control directories are located + in root directory. */ + if (strcmp(name, "INBOX") == 0 && set->inbox_path != NULL && + ((_list->flags & MAILBOX_LIST_FLAG_MAILBOX_FILES) == 0 || + type == MAILBOX_LIST_PATH_TYPE_MAILBOX)) return set->inbox_path; if (*set->maildir_name == '\0')
--- a/src/lib-storage/mailbox-list.h Thu Aug 09 18:50:56 2007 +0300 +++ b/src/lib-storage/mailbox-list.h Thu Aug 09 19:03:18 2007 +0300 @@ -13,7 +13,9 @@ /* Allow full filesystem access with absolute or relative paths. */ MAILBOX_LIST_FLAG_FULL_FS_ACCESS = 0x04, /* Rely on O_EXCL when creating dotlocks */ - MAILBOX_LIST_FLAG_DOTLOCK_USE_EXCL = 0x08 + MAILBOX_LIST_FLAG_DOTLOCK_USE_EXCL = 0x08, + /* Mailboxes are files, not directories. */ + MAILBOX_LIST_FLAG_MAILBOX_FILES = 0x10 }; enum mailbox_info_flags {