https://git.reactos.org/?p=reactos.git;a=commitdiff;h=932a812c66a6ee041f2f032fd25c2344c6a09db3

commit 932a812c66a6ee041f2f032fd25c2344c6a09db3
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Mon Dec 17 22:42:18 2018 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Mon Dec 17 22:42:18 2018 +0900

    [SHELL32] Add backslash if path was like C: (#1152)
    
    CORE-15434
---
 dll/win32/shell32/shlexec.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dll/win32/shell32/shlexec.cpp b/dll/win32/shell32/shlexec.cpp
index 6b7878d6f2..b745d40de1 100644
--- a/dll/win32/shell32/shlexec.cpp
+++ b/dll/win32/shell32/shlexec.cpp
@@ -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) ||

Reply via email to