]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: mail_index_use_existing_permissions() - Log error if stat() unexpectedly...
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 11 Sep 2017 09:58:28 +0000 (12:58 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Wed, 13 Sep 2017 12:23:01 +0000 (15:23 +0300)
src/lib-index/mail-index.c

index bc5b983199caef0a64174eeaa3f60d86e153e643..08625cde5c6576fb9a806fd2e1c729f4c675d93b 100644 (file)
@@ -108,8 +108,11 @@ bool mail_index_use_existing_permissions(struct mail_index *index)
 {
        struct stat st;
 
-       if (stat(index->dir, &st) < 0)
+       if (stat(index->dir, &st) < 0) {
+               if (errno != ENOENT)
+                       i_error("stat(%s) failed: %m", index->dir);
                return FALSE;
+       }
 
        index->mode = st.st_mode & 0666;
        if (S_ISDIR(st.st_mode) && (st.st_mode & S_ISGID) != 0) {