[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.145.2.13, 1.145.2.14

tss at dovecot.org tss at dovecot.org
Tue Mar 27 22:59:29 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv29518/mbox

Modified Files:
      Tag: branch_1_0
	mbox-storage.c 
Log Message:
Disable index files if index directory can't be created.



Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.145.2.13
retrieving revision 1.145.2.14
diff -u -d -r1.145.2.13 -r1.145.2.14
--- mbox-storage.c	22 Mar 2007 15:59:17 -0000	1.145.2.13
+++ mbox-storage.c	27 Mar 2007 19:59:27 -0000	1.145.2.14
@@ -514,8 +514,10 @@
 		return 0;
 
 	if (mkdir_parents(index_dir, CREATE_MODE) < 0) {
-		mail_storage_set_critical(&storage->storage,
-			"mkdir_parents(%s) failed: %m", index_dir);
+		if (!ENOSPACE(errno)) {
+			mail_storage_set_critical(&storage->storage,
+				"mkdir_parents(%s) failed: %m", index_dir);
+		}
 		return -1;
 	}
 
@@ -671,7 +673,7 @@
 	if (index_dir != NULL) {
 		/* make sure the index directories exist */
 		if (create_mbox_index_dirs(istorage, name) < 0)
-			return NULL;
+			index_dir = NULL;
 	}
 
 	index = index_storage_alloc(index_dir, path, MBOX_INDEX_PREFIX);
@@ -710,7 +712,7 @@
 
 		/* make sure the required directories are also there */
 		if (create_mbox_index_dirs(istorage, name) < 0)
-			return NULL;
+			index_dir = NULL;
 	}
 
 	index = index_storage_alloc(index_dir, path, MBOX_INDEX_PREFIX);



More information about the dovecot-cvs mailing list