Re: [PATCH] Fix 'git clean' failure on NFS.
- From
Török Edwin <edwintorok@gmail.com>
- Date
- Jun 18, 2010, 13:01 UTC
- Message-ID
- <4C1B6E13.1030309@gmail.com>
- In-Reply-To
- <AANLkTimm1XMmDORpnezYHSNPrKFup2H5ODQLrgJivDwg@mail.gmail.com>
On 06/18/2010 03:29 PM, Erik Faye-Lund wrote:
Show 13 quoted lines
> 2010/6/18 Török Edwin <edwintorok@gmail.com>: >> readdir() used to do a single pass, which is not always enough. >> If you unlink some files/rmdir some subdirs then there might be some >> files you haven't seen yet *before* the readdir cursor (files get rearranged >> in the directory, etc.). >> >> The fix is to do an additional readdir() pass if we unlinked/rmdired something. >> This is easily accomplished by using rewinddir. >> > > Won't this break on Windows? mingw_readdir() doesn't seem to have a > maching mingw_rewinddir() in compat/mingw.c/h.... >
rewinddir() is used in ClamAV too, and it builds natively on win32. I think we have some compat function that map rewinddir to the Win32 API, somebody will probably have to do that for git too.
Another possibility is to do closedir/opendir again on mingw.
Best regards, --Edwin