mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch for FindFirstFileExW level FindExInfoBasic.
This commit is contained in:
parent
6a19f586ea
commit
b585bfb7f4
@ -35,13 +35,14 @@ Wine. All those differences are also documented on the
|
||||
Included bugfixes and improvements
|
||||
==================================
|
||||
|
||||
**Bugfixes and features included in the next upcoming release [10]:**
|
||||
**Bugfixes and features included in the next upcoming release [11]:**
|
||||
|
||||
* Correctly treat '.' when checking for empty directories ([Wine Bug #26272](http://bugs.winehq.org/show_bug.cgi?id=26272))
|
||||
* Do not fail when a used context is passed to wglShareLists ([Wine Bug #11436](http://bugs.winehq.org/show_bug.cgi?id=11436))
|
||||
* Fix issues when driver dispatch routine returns different status codes ([Wine Bug #30155](http://bugs.winehq.org/show_bug.cgi?id=30155))
|
||||
* Limit cross thread access to ImmSet* functions ([Wine Bug #35361](http://bugs.winehq.org/show_bug.cgi?id=35361))
|
||||
* Send WM_PAINT event during dialog creation ([Wine Bug #35652](http://bugs.winehq.org/show_bug.cgi?id=35652))
|
||||
* Support for FindFirstFileExW level FindExInfoBasic ([Wine Bug #37354](http://bugs.winehq.org/show_bug.cgi?id=37354))
|
||||
* Support for IRichEditOle and ITextDocument support for ITextServices. ([Wine Bug #17042](http://bugs.winehq.org/show_bug.cgi?id=17042))
|
||||
* Support for NtQuerySection ([Wine Bug #37338](http://bugs.winehq.org/show_bug.cgi?id=37338))
|
||||
* Unity3D Editor requires ProductId registry value ([Wine Bug #36964](http://bugs.winehq.org/show_bug.cgi?id=36964))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -14,6 +14,7 @@ wine-compholio (1.7.28) UNRELEASED; urgency=low
|
||||
* Added patch to handle WRITECOPY memory protection properly on i386.
|
||||
* Added patch to implement NtQuerySection.
|
||||
* Added patches to make clearly visible, that this is a patched wine version.
|
||||
* Added patch for FindFirstFileExW level FindExInfoBasic.
|
||||
* Removed patch to support FIND_FIRST_EX_CASE_SENSITIVE flag in FindFirstFileExW (accepted upstream).
|
||||
* Removed patch to fix implementation of SH*Shared commands (accepted upstream).
|
||||
* Removed patch to export ?_BADOFF@std@@3_JB on both i386 and win64 (accepted upstream).
|
||||
|
@ -32,6 +32,7 @@ PATCHLIST := \
|
||||
fonts-Missing_Fonts.ok \
|
||||
imm32-Cross_Thread_Access.ok \
|
||||
iphlpapi-TCP_Table.ok \
|
||||
kernel32-FindFirstFile.ok \
|
||||
kernel32-GetFinalPathNameByHandle.ok \
|
||||
kernel32-GetSystemTimes.ok \
|
||||
kernel32-GetVolumePathName.ok \
|
||||
@ -405,6 +406,25 @@ iphlpapi-TCP_Table.ok:
|
||||
echo '+ { "iphlpapi-TCP_Table", "Erich E. Hoover", "Implement AllocateAndGetTcpExTableFromStack." },'; \
|
||||
) > iphlpapi-TCP_Table.ok
|
||||
|
||||
# Patchset kernel32-FindFirstFile
|
||||
# |
|
||||
# | Included patches:
|
||||
# | * Implement FindFirstFileExW level FindExInfoBasic. [by Sebastian Lackner]
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#37354] Support for FindFirstFileExW level FindExInfoBasic
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/file.c, dlls/kernel32/tests/file.c
|
||||
# |
|
||||
.INTERMEDIATE: kernel32-FindFirstFile.ok
|
||||
kernel32-FindFirstFile.ok:
|
||||
$(call APPLY_FILE,kernel32-FindFirstFile/0001-kernel32-Set-proper-error-codes-if-FindFirstFileExW-.patch)
|
||||
$(call APPLY_FILE,kernel32-FindFirstFile/0002-kernel32-Implement-FindFirstFileExW-level-FindExInfo.patch)
|
||||
@( \
|
||||
echo '+ { "kernel32-FindFirstFile", "Sebastian Lackner", "Implement FindFirstFileExW level FindExInfoBasic." },'; \
|
||||
) > kernel32-FindFirstFile.ok
|
||||
|
||||
# Patchset kernel32-GetFinalPathNameByHandle
|
||||
# |
|
||||
# | Included patches:
|
||||
|
@ -0,0 +1,31 @@
|
||||
From 33abd1e58720b208d86c8378cb1d391d96f8717c Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 3 Oct 2014 20:01:19 +0200
|
||||
Subject: kernel32: Set proper error codes if FindFirstFileExW doesn't support
|
||||
specific search_ops / levels.
|
||||
|
||||
---
|
||||
dlls/kernel32/file.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
|
||||
index 512b63e..4a6fc13 100644
|
||||
--- a/dlls/kernel32/file.c
|
||||
+++ b/dlls/kernel32/file.c
|
||||
@@ -1872,11 +1872,13 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level,
|
||||
if (search_op != FindExSearchNameMatch && search_op != FindExSearchLimitToDirectories)
|
||||
{
|
||||
FIXME("search_op not implemented 0x%08x\n", search_op);
|
||||
+ SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
if (level != FindExInfoStandard)
|
||||
{
|
||||
FIXME("info level %d not implemented\n", level );
|
||||
+ SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
--
|
||||
2.1.1
|
||||
|
@ -0,0 +1,177 @@
|
||||
From 393e48362c7c856bcb4a9e1c3c58dca1250913b3 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 3 Oct 2014 21:00:22 +0200
|
||||
Subject: kernel32: Implement FindFirstFileExW level FindExInfoBasic.
|
||||
|
||||
---
|
||||
dlls/kernel32/file.c | 14 +++++++++++---
|
||||
dlls/kernel32/tests/file.c | 46 +++++++++++++++++++++++++++++++++++-----------
|
||||
2 files changed, 46 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
|
||||
index 4a6fc13..006db1c 100644
|
||||
--- a/dlls/kernel32/file.c
|
||||
+++ b/dlls/kernel32/file.c
|
||||
@@ -57,6 +57,7 @@ typedef struct
|
||||
HANDLE handle; /* handle to directory */
|
||||
CRITICAL_SECTION cs; /* crit section protecting this structure */
|
||||
FINDEX_SEARCH_OPS search_op; /* Flags passed to FindFirst. */
|
||||
+ FINDEX_INFO_LEVELS level; /* Level passed to FindFirst */
|
||||
UNICODE_STRING mask; /* file mask */
|
||||
UNICODE_STRING path; /* NT path used to open the directory */
|
||||
BOOL is_root; /* is directory the root of the drive? */
|
||||
@@ -1875,7 +1876,7 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level,
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
- if (level != FindExInfoStandard)
|
||||
+ if (level != FindExInfoStandard && level != FindExInfoBasic)
|
||||
{
|
||||
FIXME("info level %d not implemented\n", level );
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
@@ -1979,6 +1980,7 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_LEVELS level,
|
||||
info->data_size = 0;
|
||||
info->data = NULL;
|
||||
info->search_op = search_op;
|
||||
+ info->level = level;
|
||||
|
||||
if (device)
|
||||
{
|
||||
@@ -2141,8 +2143,14 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data )
|
||||
|
||||
memcpy( data->cFileName, dir_info->FileName, dir_info->FileNameLength );
|
||||
data->cFileName[dir_info->FileNameLength/sizeof(WCHAR)] = 0;
|
||||
- memcpy( data->cAlternateFileName, dir_info->ShortName, dir_info->ShortNameLength );
|
||||
- data->cAlternateFileName[dir_info->ShortNameLength/sizeof(WCHAR)] = 0;
|
||||
+
|
||||
+ if (info->level != FindExInfoBasic)
|
||||
+ {
|
||||
+ memcpy( data->cAlternateFileName, dir_info->ShortName, dir_info->ShortNameLength );
|
||||
+ data->cAlternateFileName[dir_info->ShortNameLength/sizeof(WCHAR)] = 0;
|
||||
+ }
|
||||
+ else
|
||||
+ data->cAlternateFileName[0] = 0;
|
||||
|
||||
TRACE("returning %s (%s)\n",
|
||||
debugstr_w(data->cFileName), debugstr_w(data->cAlternateFileName) );
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index 0973efe..dd9cf06 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -2562,7 +2562,7 @@ static void test_FindNextFileA(void)
|
||||
ok ( err == ERROR_NO_MORE_FILES, "GetLastError should return ERROR_NO_MORE_FILES\n");
|
||||
}
|
||||
|
||||
-static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops, DWORD flags)
|
||||
+static void test_FindFirstFileExA(FINDEX_INFO_LEVELS level, FINDEX_SEARCH_OPS search_ops, DWORD flags)
|
||||
{
|
||||
WIN32_FIND_DATAA search_results;
|
||||
HANDLE handle;
|
||||
@@ -2574,12 +2574,15 @@ static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops, DWORD flags)
|
||||
return;
|
||||
}
|
||||
|
||||
+ trace("Running FindFirstFileExA tests with level=%d, search_ops=%d, flags=%d\n",
|
||||
+ level, search_ops, flags);
|
||||
+
|
||||
CreateDirectoryA("test-dir", NULL);
|
||||
_lclose(_lcreat("test-dir\\file1", 0));
|
||||
_lclose(_lcreat("test-dir\\file2", 0));
|
||||
CreateDirectoryA("test-dir\\dir1", NULL);
|
||||
SetLastError(0xdeadbeef);
|
||||
- handle = pFindFirstFileExA("test-dir\\*", FindExInfoStandard, &search_results, search_ops, NULL, flags);
|
||||
+ handle = pFindFirstFileExA("test-dir\\*", level, &search_results, search_ops, NULL, flags);
|
||||
if (handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
|
||||
{
|
||||
win_skip("FindFirstFileExA is not implemented\n");
|
||||
@@ -2590,16 +2593,26 @@ static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops, DWORD flags)
|
||||
win_skip("FindFirstFileExA flag FIND_FIRST_EX_LARGE_FETCH not supported, skipping test\n");
|
||||
goto cleanup;
|
||||
}
|
||||
- ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError());
|
||||
- ok(strcmp(search_results.cFileName, ".") == 0, "First entry should be '.', is %s\n", search_results.cFileName);
|
||||
+ if ((level == FindExInfoBasic) && handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_INVALID_PARAMETER)
|
||||
+ {
|
||||
+ win_skip("FindFirstFileExA level FindExInfoBasic not supported, skipping test\n");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
|
||||
#define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0)
|
||||
+#define CHECK_LEVEL(fn) (level != FindExInfoBasic || !(fn)[0])
|
||||
+
|
||||
+ ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError());
|
||||
+ ok(strcmp(search_results.cFileName, ".") == 0, "First entry should be '.', is %s\n", search_results.cFileName);
|
||||
+ ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
|
||||
|
||||
ok(FindNextFileA(handle, &search_results), "Fetching second file failed\n");
|
||||
ok(strcmp(search_results.cFileName, "..") == 0, "Second entry should be '..' is %s\n", search_results.cFileName);
|
||||
+ ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
|
||||
|
||||
ok(FindNextFileA(handle, &search_results), "Fetching third file failed\n");
|
||||
ok(CHECK_NAME(search_results.cFileName), "Invalid third entry - %s\n", search_results.cFileName);
|
||||
+ ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = FindNextFileA(handle, &search_results);
|
||||
@@ -2608,26 +2621,31 @@ static void test_FindFirstFileExA(FINDEX_SEARCH_OPS search_ops, DWORD flags)
|
||||
skip("File system supports directory filtering\n");
|
||||
/* Results from the previous call are not cleared */
|
||||
ok(strcmp(search_results.cFileName, "dir1") == 0, "Third entry should be 'dir1' is %s\n", search_results.cFileName);
|
||||
+ ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
|
||||
+
|
||||
}
|
||||
else
|
||||
{
|
||||
ok(ret, "Fetching fourth file failed\n");
|
||||
ok(CHECK_NAME(search_results.cFileName), "Invalid fourth entry - %s\n", search_results.cFileName);
|
||||
+ ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
|
||||
|
||||
ok(FindNextFileA(handle, &search_results), "Fetching fifth file failed\n");
|
||||
ok(CHECK_NAME(search_results.cFileName), "Invalid fifth entry - %s\n", search_results.cFileName);
|
||||
+ ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
|
||||
|
||||
ok(FindNextFileA(handle, &search_results) == FALSE, "Fetching sixth file should fail\n");
|
||||
}
|
||||
|
||||
#undef CHECK_NAME
|
||||
+#undef CHECK_LEVEL
|
||||
|
||||
FindClose( handle );
|
||||
|
||||
/* Most Windows systems seem to ignore the FIND_FIRST_EX_CASE_SENSITIVE flag. Unofficial documentation
|
||||
* suggests that there are registry keys and that it might depend on the used filesystem. */
|
||||
SetLastError(0xdeadbeef);
|
||||
- handle = pFindFirstFileExA("TEST-DIR\\*", FindExInfoStandard, &search_results, search_ops, NULL, flags);
|
||||
+ handle = pFindFirstFileExA("TEST-DIR\\*", level, &search_results, search_ops, NULL, flags);
|
||||
if (flags & FIND_FIRST_EX_CASE_SENSITIVE)
|
||||
{
|
||||
ok(handle != INVALID_HANDLE_VALUE || GetLastError() == ERROR_PATH_NOT_FOUND,
|
||||
@@ -4192,13 +4210,19 @@ START_TEST(file)
|
||||
test_MoveFileW();
|
||||
test_FindFirstFileA();
|
||||
test_FindNextFileA();
|
||||
- test_FindFirstFileExA(0, 0);
|
||||
- test_FindFirstFileExA(0, FIND_FIRST_EX_CASE_SENSITIVE);
|
||||
- test_FindFirstFileExA(0, FIND_FIRST_EX_LARGE_FETCH);
|
||||
+ test_FindFirstFileExA(FindExInfoStandard, 0, 0);
|
||||
+ test_FindFirstFileExA(FindExInfoStandard, 0, FIND_FIRST_EX_CASE_SENSITIVE);
|
||||
+ test_FindFirstFileExA(FindExInfoStandard, 0, FIND_FIRST_EX_LARGE_FETCH);
|
||||
+ test_FindFirstFileExA(FindExInfoBasic, 0, 0);
|
||||
+ test_FindFirstFileExA(FindExInfoBasic, 0, FIND_FIRST_EX_CASE_SENSITIVE);
|
||||
+ test_FindFirstFileExA(FindExInfoBasic, 0, FIND_FIRST_EX_LARGE_FETCH);
|
||||
/* FindExLimitToDirectories is ignored if the file system doesn't support directory filtering */
|
||||
- test_FindFirstFileExA(FindExSearchLimitToDirectories, 0);
|
||||
- test_FindFirstFileExA(FindExSearchLimitToDirectories, FIND_FIRST_EX_CASE_SENSITIVE);
|
||||
- test_FindFirstFileExA(FindExSearchLimitToDirectories, FIND_FIRST_EX_LARGE_FETCH);
|
||||
+ test_FindFirstFileExA(FindExInfoStandard, FindExSearchLimitToDirectories, 0);
|
||||
+ test_FindFirstFileExA(FindExInfoStandard, FindExSearchLimitToDirectories, FIND_FIRST_EX_CASE_SENSITIVE);
|
||||
+ test_FindFirstFileExA(FindExInfoStandard, FindExSearchLimitToDirectories, FIND_FIRST_EX_LARGE_FETCH);
|
||||
+ test_FindFirstFileExA(FindExInfoBasic, FindExSearchLimitToDirectories, 0);
|
||||
+ test_FindFirstFileExA(FindExInfoBasic, FindExSearchLimitToDirectories, FIND_FIRST_EX_CASE_SENSITIVE);
|
||||
+ test_FindFirstFileExA(FindExInfoBasic, FindExSearchLimitToDirectories, FIND_FIRST_EX_LARGE_FETCH);
|
||||
test_LockFile();
|
||||
test_file_sharing();
|
||||
test_offset_in_overlapped_structure();
|
||||
--
|
||||
2.1.1
|
||||
|
4
patches/kernel32-FindFirstFile/definition
Normal file
4
patches/kernel32-FindFirstFile/definition
Normal file
@ -0,0 +1,4 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Implement FindFirstFileExW level FindExInfoBasic.
|
||||
Revision: 1
|
||||
Fixes: [37354] Support for FindFirstFileExW level FindExInfoBasic
|
Loading…
x
Reference in New Issue
Block a user