[PATCH 2/2] ntdll: Set restart_scan on first call to NtQueryDirectoryFile.

Alexandre Julliard julliard at winehq.org
Wed Jul 20 12:29:13 CDT 2011


Grazvydas Ignotas <notasas at gmail.com> writes:

> Here is another idea:
>
> It seems getdents64 is indeed returning "." and "..", but not
> necessarily first, like Windows does. I think we could swap first 2
> entries returned, whatever they are, with "." and "..". It would work
> like this:
>
> - read the 2 first entries to advance file pointer, but ignore them,
> return "." or ".." instead
> - return other entries normally
> - after "." or ".." is encountered, save current file offset and seek
> to first or second entry (respectively) and return that instead. For a
> corner case where that spot has ".." or ".", return the other one of
> first 2.
> - seek back where we were
>
> I think this would also fix fake_dot_dot + single_entry case. What do you think?

That could probably be made to work, yes.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list