buffy.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
# HG changeset patch # User Michael Elkins <[email protected]> # Date 1360124833 0 # Branch HEAD # Node ID 82fa11059222bd6f4a93b4c746cc778f9425743d # Parent 2a1c5d3dd72eb2f27581a385ae5309e0ab744222 allow the mailbox-specific buffy check function to inspect the previous "new" status, and reset it if there is no new mail diff --git a/buffy.c b/buffy.c --- a/buffy.c +++ b/buffy.c @@ -294,6 +294,7 @@ char *p; int rc = 0; struct stat sb; + mailbox->new = 0; snprintf (path, sizeof (path), "%s/new", mailbox->path); @@ -346,6 +347,8 @@ int rc = 0; int statcheck; + mailbox->new = 0; + if (option (OPTCHECKMBOXSIZE)) statcheck = sb->st_size > mailbox->size; else @@ -415,7 +418,6 @@ { if (tmp->magic != M_IMAP) { - tmp->new = 0; #ifdef USE_POP if (mx_is_pop (tmp->path)) tmp->magic = M_POP; @@ -429,6 +431,7 @@ tmp->newly_created = 1; tmp->magic = 0; tmp->size = 0; + tmp->new = 0; continue; } }
