mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2025-10-30 08:03:03 +00:00
Add quotes around xdg-open and open commands to support paths with spaces
This commit is contained in:
parent
ebd11b2d84
commit
ad586e388e
1 changed files with 2 additions and 2 deletions
|
|
@ -235,10 +235,10 @@ void ModMenu::open_mods_folder() {
|
||||||
std::wstring path_wstr = mods_directory.wstring();
|
std::wstring path_wstr = mods_directory.wstring();
|
||||||
ShellExecuteW(NULL, L"open", path_wstr.c_str(), NULL, NULL, SW_SHOWDEFAULT);
|
ShellExecuteW(NULL, L"open", path_wstr.c_str(), NULL, NULL, SW_SHOWDEFAULT);
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
std::string command = "xdg-open " + mods_directory.string() + " &";
|
std::string command = "xdg-open \"" + mods_directory.string() + "\" &";
|
||||||
std::system(command.c_str());
|
std::system(command.c_str());
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
std::string command = "open " + mods_directory.string();
|
std::string command = "open \"" + mods_directory.string() + "\"";
|
||||||
std::system(command.c_str());
|
std::system(command.c_str());
|
||||||
#else
|
#else
|
||||||
static_assert(false, "Not implemented for this platform.");
|
static_assert(false, "Not implemented for this platform.");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue