mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-05-23 06:54:33 -04:00
Add quotes around xdg-open and open commands to support paths with spaces
This commit is contained in:
@@ -235,10 +235,10 @@ void ModMenu::open_mods_folder() {
|
||||
std::wstring path_wstr = mods_directory.wstring();
|
||||
ShellExecuteW(NULL, L"open", path_wstr.c_str(), NULL, NULL, SW_SHOWDEFAULT);
|
||||
#elif defined(__linux__)
|
||||
std::string command = "xdg-open " + mods_directory.string() + " &";
|
||||
std::string command = "xdg-open \"" + mods_directory.string() + "\" &";
|
||||
std::system(command.c_str());
|
||||
#elif defined(__APPLE__)
|
||||
std::string command = "open " + mods_directory.string();
|
||||
std::string command = "open \"" + mods_directory.string() + "\"";
|
||||
std::system(command.c_str());
|
||||
#else
|
||||
static_assert(false, "Not implemented for this platform.");
|
||||
|
||||
Reference in New Issue
Block a user