From: ak1 Date: Sun, 27 Feb 2005 22:10:55 +0000 (+0000) Subject: Andreas Krennmair: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=d720ac181fa693e7abf25632e167ed126f0c7aa8 Andreas Krennmair: reverted overeager changes in buffy.c git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@112 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/buffy.c b/buffy.c index abfc913..34010de 100644 --- 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: