[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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);
}