Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 26 May 2003 09:58:11 -0400 From: Peter Davis To: cygwin AT cygwin DOT com Subject: Behavior of stat() changed from NT to Win2000/XP Message-ID: <20030526135811.GK4032@bitstream.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i On Windows NT, the Cygwin stat function returns a non-zero value in the st_size field when called on a directory. However, in Windows 2000 and Windows XP, this same function returns 0 for st_size for a directory. This change in behavior has broken some features of mutt, and possible other programs as well. Attached is a very simple program called stat, that just calls the stat() function and displays the results. It's called like this: stat PATH If PATH is a file, stat always seems to return valid values in st_size. However, if PATH is a directory, stat returns a valid size on NT, but 0 on 2000 and XP. Is there some Cygwin setting or configuration option that controls this? Thanks, -pd -- -------- Peter Davis Funny stuff at http://www.pfdstudio.com List of resources for children's writers and illustrators at: http://www.pfdstudio.com/cwrl.html -- 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/