[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.79, 1.80
cras at procontrol.fi
cras at procontrol.fi
Sat Jun 19 23:15:27 EEST 2004
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv11322/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
create mbox root directory if it doesn't exist
Index: mbox-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- mbox-storage.c 17 Jun 2004 23:27:40 -0000 1.79
+++ mbox-storage.c 19 Jun 2004 20:15:25 -0000 1.80
@@ -193,6 +193,12 @@
size_t len = strlen(root_dir);
if (root_dir[len-1] == '/')
root_dir = t_strndup(root_dir, len-1);
+
+ /* make sure the directory exists */
+ if (mkdir(root_dir, CREATE_MODE) < 0 && errno != EEXIST) {
+ i_error("mkdir(%s) failed: %m", root_dir);
+ return NULL;
+ }
}
if (inbox_file == NULL)
More information about the dovecot-cvs
mailing list