[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.145.2.11, 1.145.2.12

tss at dovecot.org tss at dovecot.org
Sun Mar 11 20:16:45 EET 2007


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

Modified Files:
      Tag: branch_1_0
	mbox-storage.c 
Log Message:
If anything (syncing) fails because there's not enough disk space, give user
a nice error message instead of internal error.



Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.145.2.11
retrieving revision 1.145.2.12
diff -u -d -r1.145.2.11 -r1.145.2.12
--- mbox-storage.c	1 Mar 2007 12:30:11 -0000	1.145.2.11
+++ mbox-storage.c	11 Mar 2007 18:16:43 -0000	1.145.2.12
@@ -68,8 +68,14 @@
 {
 	i_assert(function != NULL);
 
-	mail_storage_set_critical(STORAGE(mbox->storage),
-		"%s failed with mbox file %s: %m", function, mbox->path);
+	if (ENOSPACE(errno)) {
+		mail_storage_set_error(STORAGE(mbox->storage),
+				       "Not enough disk space");
+	} else {
+		mail_storage_set_critical(STORAGE(mbox->storage),
+					  "%s failed with mbox file %s: %m",
+					  function, mbox->path);
+	}
 	return -1;
 }
 



More information about the dovecot-cvs mailing list