changeset 7945:346fb1ff74ed HEAD

Maildir: Create maildirfolder file also when dovecot-shared file exists when creating new mailboxes.
author Timo Sirainen <tss@iki.fi>
date Mon, 23 Jun 2008 06:52:55 +0300
parents 6d1214687c89
children aad49536db41
files src/lib-storage/index/maildir/maildir-storage.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-storage.c	Sun Jun 22 07:12:27 2008 +0300
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Mon Jun 23 06:52:55 2008 +0300
@@ -581,13 +581,14 @@
 	   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);