[BROWSEUI] SHExplorerParseCmdLine: Improve relative path handling

CORE-12882, CORE-13847
This commit is contained in:
Stanislav Motylkov 2017-12-02 23:54:35 +03:00 committed by Giannis Adamopoulos
parent 5dade73072
commit 53edadb8c0

View file

@ -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;