dovecot-2.1: maildir: If saving fails, don't bother trying to fl...

dovecot at dovecot.org dovecot at dovecot.org
Sat Dec 10 08:01:09 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/97af1836ea72
changeset: 13838:97af1836ea72
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Dec 10 08:01:02 2011 +0200
description:
maildir: If saving fails, don't bother trying to flush the file's ostream.

diffstat:

 src/lib-storage/index/maildir/maildir-save.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r aefc17d5b99e -r 97af1836ea72 src/lib-storage/index/maildir/maildir-save.c
--- a/src/lib-storage/index/maildir/maildir-save.c	Sat Dec 10 07:57:16 2011 +0200
+++ b/src/lib-storage/index/maildir/maildir-save.c	Sat Dec 10 08:01:02 2011 +0200
@@ -524,7 +524,7 @@
 	}
 
 	path = t_strconcat(ctx->tmpdir, "/", ctx->file_last->tmp_name, NULL);
-	if (o_stream_flush(_ctx->output) < 0) {
+	if (!ctx->failed && o_stream_flush(_ctx->output) < 0) {
 		if (!mail_storage_set_error_from_errno(storage)) {
 			mail_storage_set_critical(storage,
 				"o_stream_flush(%s) failed: %m", path);


More information about the dovecot-cvs mailing list