dovecot-1.0: If rename() fails, log an error.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Sep 22 17:37:50 EEST 2007
details: http://hg.dovecot.org/dovecot-1.0/rev/f0ea8a04225d
changeset: 5411:f0ea8a04225d
user: Timo Sirainen <tss at iki.fi>
date: Sat Sep 22 17:37:46 2007 +0300
description:
If rename() fails, log an error.
diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
src/plugins/lazy-expunge/lazy-expunge-plugin.c | 7 ++++++-
diffs (17 lines):
diff -r a3300666c111 -r f0ea8a04225d src/plugins/lazy-expunge/lazy-expunge-plugin.c
--- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c Sat Sep 22 17:23:34 2007 +0300
+++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c Sat Sep 22 17:37:46 2007 +0300
@@ -136,7 +136,12 @@ static int lazy_expunge_move(struct mail
if (rename(path, str_c(ctx->path)) == 0)
return 1;
- return errno == ENOENT ? 0 : -1;
+ if (errno == ENOENT)
+ return 0;
+ mail_storage_set_critical(mbox->ibox.box.storage,
+ "rename(%s, %s) failed: %m",
+ path, str_c(ctx->path));
+ return -1;
}
static int lazy_expunge_move_expunges(struct mailbox *srcbox,
More information about the dovecot-cvs
mailing list