diff --git a/src/gui/SurgeGUIUtils.cpp b/src/gui/SurgeGUIUtils.cpp index 6335a0ac0ea..1f80a1edee0 100644 --- a/src/gui/SurgeGUIUtils.cpp +++ b/src/gui/SurgeGUIUtils.cpp @@ -2,7 +2,11 @@ #include "juce_core/juce_core.h" -#include +#if LINUX +#include +#include +#include +#endif namespace Surge { @@ -67,7 +71,19 @@ void openFileOrFolder(const std::string &f) if (path.isDirectory()) { + // See this for why we branch out linux here + // https://forum.juce.com/t/linux-spaces-in-path-startasprocess-and-process-opendocument/47296 +#if LINUX + if (vfork() == 0) + { + if (execlp("xdg-open", "xdg-open", f.c_str(), (char *)nullptr) < 0) + { + _exit(0); + } + } +#else path.startAsProcess(); +#endif } else {