Subject: Re: Cygwin, mutt, Windows XP issues
From: Peter Davis <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Sat, 24 May 2003 18:04:04 -0400

I've been wrestling for weeks, or even months, with a mutt problem.
It worked beautifully under Cygwin on Windows NT, but *not* under
Windows 2000 or XP.  Specifically, mutt couldn't figure out which
mailboxes had new mail.  Once I opened a mailbox, mutt identified the
new messages correctly, but it couldn't tell me which mailboxes to
look in.

I suspected, and others suggested, it was a file protection problem,
but I couldn't find anything suspicious about that, and I tried to
un-protect all files and folders as much as possible, and still
couldn't fix the problem.

It was the size!  Mutt does a stat on each mail folder.  On NT4, this
returned a value in st_size.  In WIn2000 and XP, however, this seems
to return 0 in st_size.  Mutt assumes this means the mailbox was newly
created (a foolish assumption with MH folders), and doesn't check
further for new mail.

So I took out the " ... || sb.st_size == 0 || ... " part of the test,
and mutt seems to be working again.

I think the main issue is that Cygwin somehow changed so that stat()
returns st_size=0 for directories, and it didn't used to.

I also think mutt should *not* assume st_size==0 implies a new mailbox
(in mutt_buffy_check in buffy.c), since this may not be correctly with
MH or maildir mail structures.

-pd

-- 
--------
    Peter Davis                               Pageflex Inc
    617-520-8345                          215 First Street
    617-868-0784 (FAX)                 Cambridge, MA 02142
    [email-masked]      http://www.pageflexinc.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/