Andreas Krennmair:
authorak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 27 Feb 2005 22:10:55 +0000 (22:10 +0000)
committerak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 27 Feb 2005 22:10:55 +0000 (22:10 +0000)
reverted overeager changes in buffy.c

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@112 e385b8ad-14ed-0310-8656-cc95a2468c6d

buffy.c

diff --git a/buffy.c b/buffy.c
index abfc913..34010de 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -421,6 +421,36 @@ int mutt_buffy_check (int force)
          }
        }
        closedir (dirp);
+#if 1
+  /* I commented this out because it led to an infite "New mail in ..." loop,
+   * and when looking at the code, the check seems to be overly eager.
+   *   -- ak
+   */
+       snprintf (path, sizeof (path), "%s/cur", tmp->path);
+       if ((dirp = opendir (path)) == NULL)
+       {
+         tmp->magic = 0;
+         break;
+       }
+       while ((de = readdir (dirp)) != NULL)
+       {
+         char *p;
+         if (*de->d_name != '.' && 
+             (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T')))
+         {
+           /* one new and undeleted message is enough */
+#if 0
+           BuffyCount++;
+            /* we're checking for read and not new mail; 
+             * seems like copy'n'paste error
+             */
+           tmp->has_new = tmp->new = 1;
+#endif
+            tmp->msgcount++;
+         }
+       }
+       closedir (dirp);
+#endif
        break;
 
       case M_MH: