Blob Blame Raw
diff -Naur cyrus-imapd-2.3.1.orig/imap/make_md5.c cyrus-imapd-2.3.1/imap/make_md5.c
--- cyrus-imapd-2.3.1.orig/imap/make_md5.c	2005-12-13 16:31:08.000000000 +0100
+++ cyrus-imapd-2.3.1/imap/make_md5.c	2006-01-18 20:21:14.000000000 +0100
@@ -391,7 +391,13 @@
     FILE *file;
     int i;
 
-    if ((file=fopen(name, "w")) == NULL)
+    file = fopen(name, "w");
+    if (file == NULL && errno == ENOENT) {
+        if (cyrus_mkdir(name, 0750) == 0) {
+            file = fopen(name, "w");
+        }
+    }
+    if (file == NULL)
         return(IMAP_IOERROR);
 
     for (mailbox = list->head ; mailbox ; mailbox = mailbox->next) {