From dd07f6513f1dd889ada2b62438c12e476eef7495 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 14 Aug 2022 10:38:15 -0400 Subject: [PATCH] - encapsulate folder/file names in quotes on Windows too --- src/common/platform/win32/i_system.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/platform/win32/i_system.cpp b/src/common/platform/win32/i_system.cpp index d9dcd221d5..bbbd309a81 100644 --- a/src/common/platform/win32/i_system.cpp +++ b/src/common/platform/win32/i_system.cpp @@ -965,6 +965,7 @@ void I_OpenShellFolder(const char* folder) FString proc = folder; proc.ReplaceChars('/', '\\'); Printf("Opening folder: %s\n", proc.GetChars()); + proc.Format("\"%s\"", proc.GetChars()); ShellExecuteW(NULL, L"open", L"explorer.exe", proc.WideString().c_str(), NULL, SW_SHOWNORMAL); } @@ -973,7 +974,7 @@ void I_OpenShellFile(const char* file) FString proc = file; proc.ReplaceChars('/', '\\'); Printf("Opening folder to file: %s\n", proc.GetChars()); - proc.Format("/select,%s", proc.GetChars()); + proc.Format("/select,\"%s\"", proc.GetChars()); ShellExecuteW(NULL, L"open", L"explorer.exe", proc.WideString().c_str(), NULL, SW_SHOWNORMAL); }