https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bb723c337ac6cfa22f5e7912c0081ff78423cb5d

commit bb723c337ac6cfa22f5e7912c0081ff78423cb5d
Author:     Siavosh Kasravi <[email protected]>
AuthorDate: Sat Feb 6 17:35:11 2021 +0400
Commit:     GitHub <[email protected]>
CommitDate: Sat Feb 6 14:35:11 2021 +0100

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

Reply via email to