Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6468:bca937328758 HEAD
If rename() fails, log an error.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 22 Sep 2007 17:36:38 +0300 |
parents | 7499e36629c6 |
children | 416973e853db |
files | src/plugins/lazy-expunge/lazy-expunge-plugin.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/lazy-expunge/lazy-expunge-plugin.c Sat Sep 22 17:33:58 2007 +0300 +++ b/src/plugins/lazy-expunge/lazy-expunge-plugin.c Sat Sep 22 17:36:38 2007 +0300 @@ -134,7 +134,7 @@ unsigned int dir_len; }; -static int lazy_expunge_move(struct maildir_mailbox *mbox ATTR_UNUSED, +static int lazy_expunge_move(struct maildir_mailbox *mbox, const char *path, void *context) { struct lazy_expunge_move_context *ctx = context; @@ -146,7 +146,12 @@ 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,