[dovecot-cvs] dovecot/src/lib-storage mailbox-list.c,1.6,1.7
tss at dovecot.org
tss at dovecot.org
Thu Mar 15 03:47:12 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv30618
Modified Files:
mailbox-list.c
Log Message:
Create index/control dirs if they don't exist
Index: mailbox-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mailbox-list.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mailbox-list.c 15 Dec 2006 18:11:02 -0000 1.6
+++ mailbox-list.c 15 Mar 2007 01:47:10 -0000 1.7
@@ -3,6 +3,7 @@
#include "lib.h"
#include "array.h"
#include "ioloop.h"
+#include "mkdir-parents.h"
#include "mailbox-list-private.h"
#include <time.h>
@@ -106,6 +107,17 @@
strcmp(set->control_dir, set->root_dir) == 0 ? NULL :
p_strdup(list->pool, set->control_dir);
+ if (list->set.index_dir != NULL) {
+ if (mkdir_parents(list->set.index_dir, 0700) < 0 &&
+ errno != EEXIST)
+ i_error("mkdir(%s) failed: %m", list->set.index_dir);
+ }
+ if (list->set.control_dir != NULL) {
+ if (mkdir_parents(list->set.control_dir, 0700) < 0 &&
+ errno != EEXIST)
+ i_error("mkdir(%s) failed: %m", list->set.control_dir);
+ }
+
list->set.inbox_path = p_strdup(list->pool, set->inbox_path);
list->set.subscription_fname =
p_strdup(list->pool, set->subscription_fname);
More information about the dovecot-cvs
mailing list