From: Johannes Sixt Date: Mon, 03 Sep 2007 07:47:42 GMT Subject: Re: [PATCH] Add a new lstat implementation based on Win32 API, and make stat use that implementation too. Message-ID: <46DBBC1E.4010407@eudaptics.com> In-Reply-To: <46DACE0D.5070501@trolltech.com> Marius Storm-Olsen schrieb: > This gives us a significant speedup when adding, committing and stat'ing files. > (Also, since Windows doesn't really handle symlinks, it's fine that stat just uses lstat) Unfortunately, the patch fails t0010-racy-git.sh. I suspect the filetime conversion: > -int lstat(const char *file_name, struct stat *buf) > +static inline time_t filetime_to_time_t(const FILETIME *ft) > +{ > + long long winTime = ((long long)ft->dwHighDateTime << 32) + ft->dwLowDateTime; > + winTime -= 116444736000000000LL; /* Windows to Unix Epoch conversion */ > + winTime /= 10000000; /* Nano to seconds resolution */ Shouldn't this be 1000000000 according to your comment? However, even if I make that change, the test still fails. Could you please look into this? > + return (time_t)winTime; > +} -- Hannes