dovecot-1.0: If syncing internal dummy mbox fails, show the erro...

dovecot at dovecot.org dovecot at dovecot.org
Sat Oct 27 19:06:41 EEST 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/d58f7f66faa3
changeset: 5429:d58f7f66faa3
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Oct 27 19:06:37 2007 +0300
description:
If syncing internal dummy mbox fails, show the error message.

diffstat:

1 file changed, 8 insertions(+), 2 deletions(-)
src/deliver/deliver.c |   10 ++++++++--

diffs (20 lines):

diff -r c09d0d958b33 -r d58f7f66faa3 src/deliver/deliver.c
--- a/src/deliver/deliver.c	Thu Oct 25 21:04:13 2007 +0300
+++ b/src/deliver/deliver.c	Sat Oct 27 19:06:37 2007 +0300
@@ -773,8 +773,14 @@ int main(int argc, char *argv[])
 			   MAILBOX_OPEN_MBOX_ONE_MSG_ONLY);
 	if (box == NULL)
 		i_fatal("Can't open delivery mail as mbox");
-        if (sync_quick(box) < 0)
-		i_fatal("Can't sync delivery mail");
+	if (sync_quick(box) < 0) {
+		const char *error;
+		bool syntax, temporary_error;
+
+		error = mail_storage_get_last_error(storage, &syntax,
+						    &temporary_error);
+		i_fatal("Can't sync delivery mail: %s", error);
+	}
 
 	t = mailbox_transaction_begin(box, 0);
 	mail = mail_alloc(t, 0, NULL);


More information about the dovecot-cvs mailing list