]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 14 Sep 2017 08:34:05 +0000 (11:34 +0300)
src/lib-index/mail-index.c

index b919c788b19027bac60d562248f03d76e2372638..457669176569e51b9b2c49eae23d169b9b0b427c 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) {