Ken Thomases : ntdll: Fix the "not found" status set by read_directory_stat() and read_directory_getattrlist() for when restart_scan is set.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jun 12 07:36:12 CDT 2015
Module: wine
Branch: master
Commit: 3b74ac0f088f0eed37ef9280f8a1d558a1ec46e9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3b74ac0f088f0eed37ef9280f8a1d558a1ec46e9
Author: Ken Thomases <ken at codeweavers.com>
Date: Thu Jun 11 16:04:14 2015 -0500
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 8e4db83..0e02f2e 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;
}
}
More information about the wine-cvs
mailing list