<<< Date Index >>>     <<< Thread Index >>>

mutt/2421: mutt does not show number of or indicator for new mails for Maildir mailboxes



>Number:         2421
>Notify-List:    
>Category:       mutt
>Synopsis:       mutt does not show number of or indicator for new mails for 
>Maildir mailboxes
>Confidential:   no
>Severity:       normal
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 15 21:31:06 +0200 2006
>Originator:     Olaf Hering
>Release:        1.5.13
>Organization:
>Environment:
Linux
>Description:
consider a Maildir mailbox 'foo' and its 'cur,new,tmp' subdirectories.

mutt does not indicate in the 'change mailbox directory browser' if a Maildir 
has new unread emails or not. Or if one cares about the change date of a 
Maildir, the toplevel directory info for 'foo' is shown in the browser, instead 
of the more accurate directory info for 'foo/new'.

The attached patch demonstrates a possible change. Instead of caring about 
'foo', the browser.c:examine_directory() looks at 'foo/new' if a subdirectory 
is in Maildir format.
>How-To-Repeat:
>Fix:
Unknown
>Add-To-Audit-Trail:

>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: text/x-patch; name="mutt-1.5.4.patch"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="mutt-1.5.4.patch"
 
 ZGlmZiAtcHVyTiAtWCBtdXR0X2V4Y2x1ZGVzIG11dHQtMS41LjQub3JpZy9icm93c2VyLmMgbXV0
 dC0xLjUuNC9icm93c2VyLmMKLS0tIG11dHQtMS41LjQub3JpZy9icm93c2VyLmMJMjAwMy0wMS0y
 MSAxMzoyNToyMS4wMDAwMDAwMDAgKzAxMDAKKysrIG11dHQtMS41LjQvYnJvd3Nlci5jCTIwMDMt
 MDQtMjggMTg6MjE6MTkuMDAwMDAwMDAwICswMjAwCkBAIC0zNTMsNiArMzUzLDggQEAgc3RhdGlj
 IGludCBleGFtaW5lX2RpcmVjdG9yeSAoTVVUVE1FTlUgKgogICBESVIgKmRwOwogICBzdHJ1Y3Qg
 ZGlyZW50ICpkZTsKICAgY2hhciBidWZmZXJb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