mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[SHELL32]
- Quote paths containing spaces when executing shell commands. Patch by Huw Campbell. CORE-7542 #resolve svn path=/trunk/; revision=60895
This commit is contained in:
parent
3f83392306
commit
6fe2780f3f
|
@ -238,7 +238,12 @@ BOOL COpenWithList::Execute(COpenWithList::SApp *pApp, LPCWSTR pwszFilePath)
|
|||
--cchRemaining;
|
||||
}
|
||||
else if (pApp->wszCmd[++i] == '1')
|
||||
StringCchCopyExW(pszEnd, cchRemaining, pwszFilePath, &pszEnd, &cchRemaining, 0);
|
||||
{
|
||||
if (StrChrW(pwszFilePath, L' ') && cchRemaining > 3)
|
||||
StringCchPrintfExW(pszEnd, cchRemaining, &pszEnd, &cchRemaining, 0, L"\"%ls\"", pwszFilePath);
|
||||
else
|
||||
StringCchCopyExW(pszEnd, cchRemaining, pwszFilePath, &pszEnd, &cchRemaining, 0);
|
||||
}
|
||||
}
|
||||
/* NULL-terminate the command string */
|
||||
if (cchRemaining > 0)
|
||||
|
|
Loading…
Reference in a new issue