This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: stat matters
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 30 May 2003 09:23:40 -0400
- Subject: Re: stat matters
- References: <3.0.5.32.20030527194843.008044b0@mail.attbi.com> <3.0.5.32.20030527194843.008044b0@mail.attbi.com> <3.0.5.32.20030529223239.007fca00@incoming.verizon.net>
- Reply-to: cygwin-patches at cygwin dot com
On Thu, May 29, 2003 at 10:32:39PM -0400, Pierre A. Humblet wrote:
>At 11:33 PM 5/28/2003 -0400, Christopher Faylor wrote:
>>On Tue, May 27, 2003 at 07:48:43PM -0400, Pierre A. Humblet wrote:
>>
>>> So I suggest a more radical approach: do not check for root dir at all
>but
>>> whenever FindFirstFile fails with winerror 2 (although we know the
>>> file did exist a few ms ago and we have its attributes), call
>fstat_helper
>>> with zero dates and lengths.
>>
>>I guess this is the best approach. Want to work up a patch?
>
>Done, but it's not that simple. The error is not 2 for remote drives. Also
>I don't know what it might be on all other systems. So I check for directory
>but not for specific errors. The worst that can occur is that a directory
>that was being deleted while the stat was in progress will show up with a
>wrong date.
>
>2003-05-29 Pierre Humblet <pierre.humblet@ieee.org>
>
> * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Assume
> an existing directory is a root if FindFirstFile fails.
Please apply.
cgf