[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-storage.c, 1.166, 1.167

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


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

Modified Files:
	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.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- mbox-storage.c	22 Feb 2007 17:29:46 -0000	1.166
+++ mbox-storage.c	11 Mar 2007 18:16:45 -0000	1.167
@@ -71,8 +71,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