From: Ken Thomases Subject: [PATCH 2/4] ntdll: If read_directory_getattrlist() finds that the file doesn't exist, return successful "no file" result to stop search. [try 2] Message-Id: Date: Wed, 20 May 2015 14:59:11 -0500 try 2: Only stop the search on a case-insensitive file system. On a case-sensitive file system, ENOENT may just mean we have to do a manual case-insensitive search. --- dlls/ntdll/directory.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 0e5af8a..267f019 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2185,6 +2185,11 @@ static int read_directory_getattrlist( int fd, IO_STATUS_BLOCK *io, void *buffer } else io->u.Status = STATUS_NO_MORE_FILES; } + else if ((errno == ENOENT || errno == ENOTDIR) && !get_dir_case_sensitivity(".")) + { + io->u.Status = STATUS_NO_MORE_FILES; + ret = 0; + } } else ret = -1;