From 0ee3fdb5e94ae6f34cb873ca3c9858342621e55f Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 23 Nov 2009 14:50:20 -0500 Subject: [PATCH] mail storage service: If chdir() fails with EACCES, give a better error message. --HG-- branch : HEAD --- src/lib-storage/mail-storage-service.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index af3d61fd9b..5f818d61d0 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -338,7 +338,10 @@ mail_storage_service_init_post(struct mail_storage_service_ctx *ctx, /* If possible chdir to home directory, so that core file could be written in case we crash. */ if (chdir(home) < 0) { - if (errno != ENOENT) + if (errno == EACCES) { + i_error("%s", eacces_error_get("chdir", + t_strconcat(home, "/", NULL))); + } if (errno != ENOENT) i_error("chdir(%s) failed: %m", home); else if (mail_set->mail_debug) i_debug("Home dir not found: %s", home); -- 2.47.3