[SHELL32] Add backslash if path was like C: (#1152)

CORE-15434
This commit is contained in:
Katayama Hirofumi MZ 2018-12-17 22:42:18 +09:00 committed by GitHub
parent c94ca8128d
commit 932a812c66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2422,6 +2422,11 @@ HRESULT WINAPI ShellExecCmdLine(
else
{
pchParams = SplitParams(lpCommand, szFile, _countof(szFile));
if (szFile[0] != UNICODE_NULL && szFile[1] == L':' &&
szFile[2] == UNICODE_NULL)
{
PathAddBackslashW(szFile);
}
if (SearchPathW(NULL, szFile, NULL, _countof(szFile2), szFile2, NULL) ||
SearchPathW(NULL, szFile, wszExe, _countof(szFile2), szFile2, NULL) ||
SearchPathW(NULL, szFile, wszCom, _countof(szFile2), szFile2, NULL) ||