From 3b74ac0f088f0eed37ef9280f8a1d558a1ec46e9 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Thu, 11 Jun 2015 16:04:14 -0500 Subject: [PATCH] ntdll: Fix the "not found" status set by read_directory_stat() and read_directory_getattrlist() for when restart_scan is set. --- dlls/ntdll/directory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 8e4db83b9c3..0e02f2e2958 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -2103,7 +2103,7 @@ static int read_directory_stat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG info->next = 0; if (io->u.Status != STATUS_BUFFER_OVERFLOW) lseek( fd, 1, SEEK_CUR ); } - else io->u.Status = STATUS_NO_MORE_FILES; + else io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES; } else if (!case_sensitive && ret && (errno == ENOENT || errno == ENOTDIR)) { @@ -2112,7 +2112,7 @@ static int read_directory_stat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG * read_directory_* function (we need to return the case-preserved * filename stored on the filesystem). */ ret = 0; - io->u.Status = STATUS_NO_MORE_FILES; + io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES; } else { @@ -2197,11 +2197,11 @@ static int read_directory_getattrlist( int fd, IO_STATUS_BLOCK *io, void *buffer info->next = 0; if (io->u.Status != STATUS_BUFFER_OVERFLOW) lseek( fd, 1, SEEK_CUR ); } - else io->u.Status = STATUS_NO_MORE_FILES; + else io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES; } else if ((errno == ENOENT || errno == ENOTDIR) && !get_dir_case_sensitivity(".")) { - io->u.Status = STATUS_NO_MORE_FILES; + io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES; ret = 0; } }