hi,
Since the change from readdir to getdents64 I cannot access certain files and dir's (including the one used for saving wine patches) with the common file dialog's.
| 0009:Call ntdll.NtQueryDirectoryFile(00000010,00000000,00000000,00000000,77a6a070,77cc6b24,00002000,00000003,00000000,77cc6b10,00000000) ret=77b26174 | trace:file:NtQueryDirectoryFile (0x10 (nil) (nil) (nil) 0x77a6a070 0x77cc6b24 0x00002000 0x00000003 0x00000000 L"diffs" 0x00000000 | trace:file:append_entry long L"."... short L""... mask L"diffs" | trace:file:match_filename (L"."..., L"diffs") | trace:file:append_entry long L".."... short L""... mask L"diffs" | trace:file:match_filename (L".."..., L"diffs")
[some 200 entries snipped]
| trace:file:append_entry long L"freecell.ICO"... short L""... mask L"diffs" | trace:file:match_filename (L"freecell.ICO"..., L"diffs") | trace:file:NtQueryDirectoryFile => 80000006 (0) | 0009:Ret ntdll.NtQueryDirectoryFile() retval=80000006 ret=77b26174 | 0009:Call ntdll.RtlNtStatusToDosError(80000006) ret=77b261e1 | 0009:Ret ntdll.RtlNtStatusToDosError() retval=00000012 ret=77b261e1 | trace:file:FindFirstFileExW L"H:\diffs" not found
H:\ contains almost 400 entries, so it is clear not all are read.
Looking through the code I notice that getdents64 is called only once, where readdir was called several times.
Here is my solution that fixes the problem for me.
Changelog: dlls/ntdll : directory.c If needed, keep calling getdents64() until no more entries are returned.
Rein.