Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sat, 24 May 2003 18:04:04 -0400
From: Peter Davis <pdavis@pageflexinc.com>
To: cygwin@cygwin.com
Cc: mutt-dev@mutt.org, mutt-users@mutt.org
Subject: Re: Cygwin, mutt, Windows XP issues
Message-ID: <20030524220404.GA2864@bitstream.com>
Mail-Followup-To: Peter Davis <pdavis@pageflexinc.com>, cygwin@cygwin.com,
	mutt-dev@mutt.org, mutt-users@mutt.org
References: <20030524115323.GA4424@bitstream.com> <Pine.GSO.4.44.0305241223340.26092-100000@slinky.cs.nyu.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.GSO.4.44.0305241223340.26092-100000@slinky.cs.nyu.edu>
User-Agent: Mutt/1.5.4i

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
    pdavis@pageflexinc.com      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/

