X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=buffy.c;h=34010dec271639c3307ba11e667b1f0f99a80ad3;hb=507a319c3af728c7cad6bc492cffa188fb8ad7bb;hp=abfc91390a4fe0ed520b85262f21dba7ee434ea4;hpb=004f8d226cb42f93c0025b0ed3a6edf87d7bb8a0;p=apps%2Fmadmutt.git 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: