Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch around Juce Path Space bug #4881

Merged
merged 1 commit into from
Aug 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/gui/SurgeGUIUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

#include "juce_core/juce_core.h"

#include <cctype>
#if LINUX
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#endif

namespace Surge
{
Expand Down Expand Up @@ -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
{
Expand Down