From: Timo Sirainen Date: Mon, 23 Jun 2008 03:52:55 +0000 (+0300) Subject: Maildir: Create maildirfolder file also when dovecot-shared file exists when X-Git-Tag: 1.2.alpha1~216 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30656419ac3010d31107329e58049a50135b9e77;p=thirdparty%2Fdovecot%2Fcore.git Maildir: Create maildirfolder file also when dovecot-shared file exists when creating new mailboxes. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/maildir/maildir-storage.c b/src/lib-storage/index/maildir/maildir-storage.c index b30a6fee19..1e02ddedc8 100644 --- a/src/lib-storage/index/maildir/maildir-storage.c +++ b/src/lib-storage/index/maildir/maildir-storage.c @@ -581,13 +581,14 @@ static int maildir_mailbox_create(struct mail_storage *_storage, its permissions and gid, and copy the dovecot-shared inside it. */ shared_path = t_strconcat(root_dir, "/dovecot-shared", NULL); if (stat(shared_path, &st) == 0) { - return maildir_create_shared(_storage, path, - st.st_mode & 0666, st.st_gid); + if (maildir_create_shared(_storage, path, + st.st_mode & 0666, st.st_gid) < 0) + return -1; + } else { + if (create_maildir(_storage, path, FALSE) < 0) + return -1; } - if (create_maildir(_storage, path, FALSE) < 0) - return -1; - /* Maildir++ spec want that maildirfolder named file is created for all subfolders. */ path = t_strconcat(path, "/" MAILDIR_SUBFOLDER_FILENAME, NULL);