changeset 8847:43a49b3d3b5e HEAD

Maildir: Another logging improvement to EACCES error.
author Timo Sirainen <tss@iki.fi>
date Mon, 23 Mar 2009 12:51:30 -0400
parents d6ef39b9e4cf
children dd441977c578
files src/lib-storage/index/maildir/maildir-sync.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-sync.c	Fri Mar 20 12:28:37 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Mon Mar 23 12:51:30 2009 -0400
@@ -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 @@
 			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;
 		}