Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7190:b9a9c7257f4e HEAD
Don't fsync() saved mail if saving failed and we're going to unlink() it.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 25 Jan 2008 13:45:36 +0200 |
parents | 34057a03a357 |
children | 1cbaa724aba8 |
files | src/lib-storage/index/maildir/maildir-save.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-save.c Fri Jan 25 13:44:40 2008 +0200 +++ b/src/lib-storage/index/maildir/maildir-save.c Fri Jan 25 13:45:36 2008 +0200 @@ -490,7 +490,7 @@ output_errno = ctx->output->stream_errno; o_stream_destroy(&ctx->output); - if (!ctx->mbox->ibox.fsync_disable) { + if (!ctx->mbox->ibox.fsync_disable && !ctx->failed) { if (fsync(ctx->fd) < 0) { mail_storage_set_critical(storage, "fsync(%s) failed: %m", path);