mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[SHELL32][SHELL32_APITEST] FindExecutable: Add PRF_FIRSTDIRDEF flag (#6681)
Follow-up to #6635. The directory search without this flag didn't work. JIRA issue: CORE-19493 - Add PRF_FIRSTDIRDEF flag for PathResolveW call. - Delete needless macro definitions in PathQualifyExW. - Remove an assertion in IsLFNDriveW. - Fix shell32_apitest:FindExecutable testcase.
This commit is contained in:
parent
5442f87080
commit
84f15b15fb
3 changed files with 1 additions and 12 deletions
|
@ -1281,7 +1281,7 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR
|
|||
if (!GetShortPathNameW(lpFile, res, _countof(res)))
|
||||
StringCchCopyW(res, _countof(res), lpFile);
|
||||
|
||||
if (PathResolveW(res, dirs, PRF_TRYPROGRAMEXTENSIONS))
|
||||
if (PathResolveW(res, dirs, PRF_TRYPROGRAMEXTENSIONS | PRF_FIRSTDIRDEF))
|
||||
{
|
||||
// NOTE: The last parameter of this AssocQueryStringW call is "strange" in Windows.
|
||||
if (PathIsExeW(res) ||
|
||||
|
|
|
@ -223,10 +223,6 @@ PathQualifyExW(_Inout_ LPWSTR pszPath, _Inout_opt_ LPCWSTR pszDir, _In_ DWORD dw
|
|||
PWCHAR pch;
|
||||
for (pch = pchTemp; *pch != UNICODE_NULL; ++pch)
|
||||
{
|
||||
#define PATH_CHAR_CLASS_DOT 0x00000004
|
||||
#define PATH_CHAR_CLASS_BACKSLASH 0x00000008
|
||||
#define PATH_CHAR_CLASS_COLON 0x00000010
|
||||
#define PATH_CHAR_CLASS_OTHER_VALID 0x00000100
|
||||
#define VALID_SHORT_PATH_CHAR_CLASSES ( \
|
||||
PATH_CHAR_CLASS_DOT | \
|
||||
PATH_CHAR_CLASS_BACKSLASH | \
|
||||
|
@ -616,8 +612,6 @@ BOOL WINAPI IsLFNDriveW(LPCWSTR lpszPath)
|
|||
}
|
||||
else
|
||||
{
|
||||
assert(!PathIsRelativeW(lpszPath)); /* Assuming absolute path... */
|
||||
|
||||
iDrive = ((lpszPath[0] - L'A') & 0x1F);
|
||||
PathBuildRootW(szRoot, iDrive);
|
||||
|
||||
|
|
|
@ -71,11 +71,6 @@ static const TEST_ENTRY s_entries[] =
|
|||
{ __LINE__, SE_ERR_FNF, "C:\\notepad.exe", DIR_2, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "C:\\notepad.exe", DIR_3, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "C:\\notepad.exe", DIR_4, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "..\\notepad.exe", DIR_0, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "..\\notepad.exe", DIR_1, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "..\\notepad.exe", DIR_2, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "..\\notepad.exe", DIR_3, "" },
|
||||
{ __LINE__, SE_ERR_FNF, "..\\notepad.exe", DIR_4, "" },
|
||||
{ __LINE__, SE_ERR_FNF, ".\\notepad.exe", DIR_0, "" },
|
||||
{ __LINE__, SE_ERR_FNF, ".\\notepad.exe", DIR_1, "" },
|
||||
{ __LINE__, SE_ERR_FNF, ".\\notepad.exe", DIR_2, "" },
|
||||
|
|
Loading…
Reference in a new issue