From: Timo Sirainen Date: Mon, 24 Jul 2017 13:36:45 +0000 (+0300) Subject: lib-storage: If chdir(home) fails due to EACCES, don't log two errors. X-Git-Tag: 2.3.0.rc1~1226 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fe027b2cac9fd227e7bf639cf0dcba27b47f65c;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: If chdir(home) fails due to EACCES, don't log two errors. --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index d5d88495b1..49a4f4b1bc 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -731,7 +731,7 @@ mail_storage_service_init_post(struct mail_storage_service_ctx *ctx, if (errno == EACCES) { i_error("%s", eacces_error_get("chdir", t_strconcat(home, "/", NULL))); - } if (errno != ENOENT) + } else if (errno != ENOENT) i_error("chdir(%s) failed: %m", home); else if (mail_set->mail_debug) i_debug("Home dir not found: %s", home);