https://git.reactos.org/?p=reactos.git;a=commitdiff;h=53edadb8c0ce1ced5faedcd5080b1a65d3f85212
commit 53edadb8c0ce1ced5faedcd5080b1a65d3f85212 Author: Stanislav Motylkov <[email protected]> AuthorDate: Sat Dec 2 23:54:35 2017 +0300 [BROWSEUI] SHExplorerParseCmdLine: Improve relative path handling CORE-12882, CORE-13847 --- dll/win32/browseui/parsecmdline.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dll/win32/browseui/parsecmdline.cpp b/dll/win32/browseui/parsecmdline.cpp index d2a0d2f9b3..acf617607f 100644 --- a/dll/win32/browseui/parsecmdline.cpp +++ b/dll/win32/browseui/parsecmdline.cpp @@ -382,6 +382,12 @@ SHExplorerParseCmdLine(ExplorerCommandLineParseResults * pInfo) { // Or just a plain old string. + WCHAR szPath[MAX_PATH]; + DWORD result = GetFullPathNameW(strField, _countof(szPath), szPath, NULL); + + if (result != 0 && result <= _countof(szPath) && PathFileExistsW(szPath)) + StringCchCopyW(strField, _countof(strField), szPath); + LPITEMIDLIST pidlPath = ILCreateFromPathW(strField); pInfo->pidlPath = pidlPath;
