Mercurial > dovecot > core-2.2
changeset 12271:0cc916fc09f9
lib-storage: Added MAIL_STORAGE_FLAG_NO_AUTOVERIFY to skip checking storage root dir existence.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 15 Oct 2010 14:56:05 +0100 |
parents | a8b9d7fdc646 |
children | 2d6396330099 |
files | src/lib-storage/mail-storage.c src/lib-storage/mail-storage.h |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage.c Fri Oct 15 14:48:31 2010 +0100 +++ b/src/lib-storage/mail-storage.c Fri Oct 15 14:56:05 2010 +0100 @@ -190,6 +190,9 @@ mode_t mode; gid_t gid; + if ((flags & MAIL_STORAGE_FLAG_NO_AUTOVERIFY) != 0) + return 0; + root_dir = mailbox_list_get_path(list, NULL, MAILBOX_LIST_PATH_TYPE_MAILBOX); if (root_dir == NULL) {
--- a/src/lib-storage/mail-storage.h Fri Oct 15 14:48:31 2010 +0100 +++ b/src/lib-storage/mail-storage.h Fri Oct 15 14:56:05 2010 +0100 @@ -20,7 +20,10 @@ MAIL_STORAGE_FLAG_NO_AUTODETECTION = 0x02, /* Don't autocreate any directories. If they don't exist, fail to create the storage. */ - MAIL_STORAGE_FLAG_NO_AUTOCREATE = 0x04 + MAIL_STORAGE_FLAG_NO_AUTOCREATE = 0x04, + /* Don't verify existence or accessibility of any directories. + Create the storage in any case. */ + MAIL_STORAGE_FLAG_NO_AUTOVERIFY = 0x08 }; enum mailbox_flags {