[SHELL32] Fixing COpenWithMenu.cpp for handling path strings with spaces (#3449)

CORE-17445

Fixing the bug where open with menu where OpenWithMenu does not handle handler's path when there are spaces in the path string, by adding the missing quote marks around %1 when recording the registry entry for file handler.
This commit is contained in:
Siavosh Kasravi
2021-02-06 17:35:11 +04:00
committed by GitHub
parent 32f7474f38
commit bb723c337a

View File

@@ -155,7 +155,7 @@ COpenWithList::SApp *COpenWithList::Add(LPCWSTR pwszPath)
if (pApp)
{
StringCbPrintfW(pApp->wszCmd, sizeof(pApp->wszCmd), L"\"%s\" %%1", pwszPath);
StringCbPrintfW(pApp->wszCmd, sizeof(pApp->wszCmd), L"\"%s\" \"%%1\"", pwszPath);
SaveApp(pApp);
}