From bb723c337ac6cfa22f5e7912c0081ff78423cb5d Mon Sep 17 00:00:00 2001 From: Siavosh Kasravi Date: Sat, 6 Feb 2021 17:35:11 +0400 Subject: [PATCH] [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. --- dll/win32/shell32/COpenWithMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/shell32/COpenWithMenu.cpp b/dll/win32/shell32/COpenWithMenu.cpp index 3afb60c65f1..ee6828bcbc5 100644 --- a/dll/win32/shell32/COpenWithMenu.cpp +++ b/dll/win32/shell32/COpenWithMenu.cpp @@ -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); }