[PATCH] kernel32: FindFirstFileExW needs to open the directory with FILE_OPEN_FOR_BACKUP_INTENT flag.
Patch by user qsniyg on bugzilla. The usvfs project on github checks for this flag to allow iteration of directories. The ntdll/directory tests always pass this flag in when opening a directory. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47833 Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/kernel32/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 8691a726e3..c3be67cc3c 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -754,7 +754,7 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level, status = NtOpenFile( &info->handle, GENERIC_READ | SYNCHRONIZE, &attr, &io, FILE_SHARE_READ | FILE_SHARE_WRITE, - FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); + FILE_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT ); if (status != STATUS_SUCCESS) { -- 2.17.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=57721 Your paranoid android. === debian10 (32 bit report) === kernel32: debugger: Timeout === debian10 (32 bit Chinese:China report) === kernel32: debugger.c:320: Test failed: GetThreadContext failed: 5 === debian10 (32 bit WoW report) === kernel32: debugger.c:320: Test failed: GetThreadContext failed: 5 === debian10 (64 bit WoW report) === kernel32: comm.c:919: Test failed: OutQueue should not be empty
participants (2)
-
Alistair Leslie-Hughes -
Marvin