]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Maildir: Create maildirfolder file also when dovecot-shared file exists when
authorTimo Sirainen <tss@iki.fi>
Mon, 23 Jun 2008 03:52:55 +0000 (06:52 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 23 Jun 2008 03:52:55 +0000 (06:52 +0300)
creating new mailboxes.

--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-storage.c

index b30a6fee19be26dab248d896052fdbcf0e45a25c..1e02ddedc84317dd78a103c68727f077ee1f53c6 100644 (file)
@@ -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);