Re: Implementing stat() with FindFirstFile()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, March 21, 2009 at 20:55 CET,
     Johannes Sixt <j6t@xxxxxxxx> wrote:

> On Samstag, 21. März 2009, Magnus Bäck wrote:
>
> > Is there any reason why compat/win32.h uses GetFileAttributesEx()
> > instead of FindFirstFile() to implement the stat() call on Windows?
> > The current implementation requires each queried file to be opened
> > and closed while FindFirstFile() only reads the directory.
> 
> There is: File times are extremely important for git. Unfortunately,
> MS's implementation of stat and utime are broken, and they do use
> FindFirstFile(). Read up on the topic here:
> 
> http://search.cpan.org/~shay/Win32-UTCFileTime-1.50/lib/Win32/UTCFileTime.pm

Quite interesting, thanks. As it often is, "obvious" changes that
haven't been made aren't that obvious after all.

>From what I gather the problematic conversion takes place in the Win32
layer, in which case we might be able to call the ZwQueryDirectoryFile()
kernel routine directly via ntdll.dll to obtain the file times straight
from the file system. Has anyone explored that path, and would it be
acceptable to make such a change?

[...]

-- 
Magnus Bäck
baeck@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux