From: Timo Sirainen Date: Mon, 23 Mar 2009 16:51:30 +0000 (-0400) Subject: Maildir: Another logging improvement to EACCES error. X-Git-Tag: 1.2.beta4~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dc8837ab37c1a606add1067e21ed868754db4e3;p=thirdparty%2Fdovecot%2Fcore.git Maildir: Another logging improvement to EACCES error. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/maildir/maildir-sync.c b/src/lib-storage/index/maildir/maildir-sync.c index bb30f6c333..27cda4bfbf 100644 --- a/src/lib-storage/index/maildir/maildir-sync.c +++ b/src/lib-storage/index/maildir/maildir-sync.c @@ -176,6 +176,7 @@ #include "buffer.h" #include "hash.h" #include "str.h" +#include "eacces-error.h" #include "nfs-workarounds.h" #include "maildir-storage.h" #include "maildir-uidlist.h" @@ -375,8 +376,13 @@ static int maildir_scan_dir(struct maildir_sync_context *ctx, bool new_dir) break; if (errno != ENOENT || i == MAILDIR_DELETE_RETRY_COUNT) { - mail_storage_set_critical(storage, - "opendir(%s) failed: %m", path); + if (errno == EACCES) { + mail_storage_set_critical(storage, "%s", + eacces_error_get("opendir", path)); + } else { + mail_storage_set_critical(storage, + "opendir(%s) failed: %m", path); + } return -1; }