On Mon, Jul 18, 2011 at 1:41 PM, Alexandre Julliard julliard@winehq.org wrote:
Grazvydas Ignotas notasas@gmail.com writes:
@@ -2004,6 +2004,8 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event, fstat( fd, &st ); curdir.dev = st.st_dev; curdir.ino = st.st_ino;
- if (lseek( fd, 0, SEEK_CUR ) == 0)
- restart_scan = TRUE;
That won't work if we already returned '.' and '..'.
You mean fake '.' and '..'?
Do you have any suggestions how to track state between calls? I'm thinking about using global structure to track dev_t, ino_t and off_t (and maybe handle), and if any of those changes since last exit from the function consider it as a first call for this handle.
It looks like the best way would be to attach state to handle somehow (that would be dropped automatically on CloseHandle), but I failed to find a way to do so.
-- Alexandre Julliard julliard@winehq.org