[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c,
1.102, 1.103
cras at dovecot.org
cras at dovecot.org
Fri Oct 15 16:38:00 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv7301/lib-storage/index/mbox
Modified Files:
mbox-storage.c
Log Message:
Try to create the whole directory structure up to root_dir if it doesn't exist.
Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- mbox-storage.c 10 Oct 2004 17:44:54 -0000 1.102
+++ mbox-storage.c 15 Oct 2004 13:37:58 -0000 1.103
@@ -206,8 +206,9 @@
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);
+ if (mkdir_parents(root_dir, CREATE_MODE) < 0 &&
+ errno != EEXIST) {
+ i_error("mkdir_parents(%s) failed: %m", root_dir);
return NULL;
}
}
More information about the dovecot-cvs
mailing list