diff --git a/src/common/platform/posix/cocoa/i_system.mm b/src/common/platform/posix/cocoa/i_system.mm index 02cad154a..f83536d53 100644 --- a/src/common/platform/posix/cocoa/i_system.mm +++ b/src/common/platform/posix/cocoa/i_system.mm @@ -173,14 +173,14 @@ unsigned int I_MakeRNGSeed() void I_OpenShellFolder(const char* folder) { - std::string x = (std::string)"open " + (std::string)folder; + std::string x = (std::string)"open \"" + (std::string)folder + "\""; Printf("Opening folder: %s\n", folder); std::system(x.c_str()); } void I_OpenShellFile(const char* file) { - std::string x = (std::string)"open " + (std::string)file; + std::string x = (std::string)"open \"" + (std::string)file + "\""; x.erase(x.find_last_of('/'), std::string::npos); Printf("Opening folder to file: %s\n", file); std::system(x.c_str()); diff --git a/src/common/platform/posix/sdl/i_system.cpp b/src/common/platform/posix/sdl/i_system.cpp index 3dd43e98d..d96613494 100644 --- a/src/common/platform/posix/sdl/i_system.cpp +++ b/src/common/platform/posix/sdl/i_system.cpp @@ -434,14 +434,14 @@ unsigned int I_MakeRNGSeed() void I_OpenShellFolder(const char* folder) { - std::string x = (std::string)"xdg-open " + (std::string)folder; + std::string x = (std::string)"xdg-open \"" + (std::string)folder + "\""; Printf("Opening folder: %s\n", folder); std::system(x.c_str()); } void I_OpenShellFile(const char* file) { - std::string x = (std::string)"xdg-open " + (std::string)file; + std::string x = (std::string)"xdg-open \"" + (std::string)file + "\""; x.erase(x.find_last_of('/'), std::string::npos); Printf("Opening folder to file: %s\n", file); std::system(x.c_str());