about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2002-01-06 01:07:23 +0000
committerBart Schaefer <barts@users.sourceforge.net>2002-01-06 01:07:23 +0000
commit9629b2dc53be56d2db53db07b06bf29a23335600 (patch)
treedf1757c73801c4181e3d6fb130af5b5a913ceecf
parent05c2b84ad1d9061c7123d7d0c85bf29219cd7d01 (diff)
downloadzsh-9629b2dc53be56d2db53db07b06bf29a23335600.tar.gz
zsh-9629b2dc53be56d2db53db07b06bf29a23335600.tar.xz
zsh-9629b2dc53be56d2db53db07b06bf29a23335600.zip
15746: remove (with #if) an incorrect optimization in the maildir version
of mailstat().
-rw-r--r--Src/utils.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 8779d25dc..6a0c27e29 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3748,7 +3748,7 @@ mailstat(char *path, struct stat *st)
        DIR                     *dd;
        struct                  dirent *fn;
        struct stat             st_ret, st_tmp;
-       static struct stat      st_new_last, st_ret_last;
+       static struct stat      st_ret_last;
        char                    *dir, *file = 0;
        int                     i;
        time_t                  atime = 0, mtime = 0;
@@ -3782,6 +3782,9 @@ mailstat(char *path, struct stat *st)
        if (stat(dir, &st_tmp) || !S_ISDIR(st_tmp.st_mode)) return 0;
        st_ret.st_mtime = st_tmp.st_mtime;
 
+#if THERE_IS_EXACTLY_ONE_MAILDIR_IN_MAILPATH
+       {
+       static struct stat      st_new_last;
        /* Optimization - if new/ didn't change, nothing else did. */
        if (st_tmp.st_dev == st_new_last.st_dev &&
            st_tmp.st_ino == st_new_last.st_ino &&
@@ -3791,6 +3794,8 @@ mailstat(char *path, struct stat *st)
 	   return 0;
        }
        st_new_last = st_tmp;
+       }
+#endif
 
        /* Loop over new/ and cur/ */
        for (i = 0; i < 2; i++) {