]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Maildir: Another logging improvement to EACCES error.
authorTimo Sirainen <tss@iki.fi>
Mon, 23 Mar 2009 16:51:30 +0000 (12:51 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 23 Mar 2009 16:51:30 +0000 (12:51 -0400)
--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-sync.c

index bb30f6c3337e004524a53047e2d47b2d34adfdea..27cda4bfbfe732faf7de50a340aa3dd7b1ccf456 100644 (file)
 #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;
                }