# vim:ft=diff: [continued from sidebar-compat-revert] After having applied the sidebar patch, we now re-apply the relevant part of the maildir-mtime patch. The hunk is considerably shorter as we are always counting messages; the if..break part has been dropped. --- a/buffy.c +++ b/buffy.c @@ -444,6 +444,11 @@ tmp->has_new = tmp->new = 1; tmp->msgcount++; tmp->msg_unread++; + snprintf (path, sizeof (path), "%s/new/%s", tmp->path, de->d_name); + if (!stat (path, &smd) && smd.st_mtime > tmp->mtime) + { + tmp->mtime = smd.st_mtime; + } } } if(tmp->msg_unread) --- a/buffy.h +++ b/buffy.h @@ -26,6 +26,7 @@ off_t size; struct buffy_t *next; struct buffy_t *prev; + time_t mtime; /* for maildirs...time of newest entry */ short new; /* mailbox has new mail */ short has_new; /* set it new if new and not read */ int msgcount; /* total number of messages */