Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2794:1472e409c299 HEAD
Removed special Maildir/.INBOX directory. Indexes are now stored in maildir
root.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Oct 2004 23:46:37 +0300 |
parents | 19a6ff9fed58 |
children | 913f6db2dffc |
files | src/lib-storage/index/maildir/maildir-storage.c |
diffstat | 1 files changed, 9 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-storage.c Wed Oct 20 23:19:57 2004 +0300 +++ b/src/lib-storage/index/maildir/maildir-storage.c Wed Oct 20 23:46:37 2004 +0300 @@ -208,8 +208,9 @@ if (storage->index_dir == NULL) return NULL; - if (strcmp(name, "INBOX") == 0 && storage->inbox_path != NULL) - return storage->inbox_path; + if (strcmp(name, "INBOX") == 0 && + strcmp(storage->index_dir, storage->dir) == 0) + return storage->dir; if (full_filesystem_access && (*name == '/' || *name == '~')) return maildir_get_absolute_path(name, FALSE); @@ -328,23 +329,13 @@ static int verify_inbox(struct index_storage *storage) { - const char *inbox; - - if (storage->inbox_path == NULL) { - /* first make sure the cur/ new/ and tmp/ dirs exist - in root dir */ - if (create_maildir(storage, storage->dir, TRUE) < 0) - return -1; + const char *path; - /* create the .INBOX directory */ - inbox = t_strconcat(storage->index_dir, - "/"MAILDIR_FS_SEP_S"INBOX", NULL); - if (mkdir_verify(storage, inbox, TRUE) < 0) - return -1; - } else { - if (create_maildir(storage, storage->inbox_path, TRUE) < 0) - return -1; - } + path = storage->inbox_path != NULL ? + storage->inbox_path : storage->dir; + + if (create_maildir(storage, path, TRUE) < 0) + return -1; /* make sure the index directories exist */ if (create_index_dir(storage, "INBOX") < 0)