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