dovecot-2.2: fts: If we detect corrupted fts expunge log, unlink...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jul 3 11:38:53 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/9c6643daae98
changeset: 17574:9c6643daae98
user: Timo Sirainen <tss at iki.fi>
date: Thu Jul 03 14:37:08 2014 +0300
description:
fts: If we detect corrupted fts expunge log, unlink it.
This avoids the same error repeating forever.
diffstat:
src/plugins/fts/fts-expunge-log.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r 140619879047 -r 9c6643daae98 src/plugins/fts/fts-expunge-log.c
--- a/src/plugins/fts/fts-expunge-log.c Thu Jul 03 12:44:50 2014 +0300
+++ b/src/plugins/fts/fts-expunge-log.c Thu Jul 03 14:37:08 2014 +0300
@@ -459,6 +459,11 @@
*_ctx = NULL;
+ if (ctx->corrupted) {
+ if (unlink(ctx->log->path) < 0 && errno != ENOENT)
+ i_error("unlink(%s) failed: %m", ctx->log->path);
+ }
+
if (ctx->input != NULL)
i_stream_unref(&ctx->input);
i_free(ctx);
More information about the dovecot-cvs
mailing list