| @@ -1042,10 +1042,11 @@ public: | |||||
| ActiveProcess (const StringArray& arguments, int streamFlags) | ActiveProcess (const StringArray& arguments, int streamFlags) | ||||
| : childPID (0), pipeHandle (0), readHandle (0) | : childPID (0), pipeHandle (0), readHandle (0) | ||||
| { | { | ||||
| String exe (arguments[0].unquoted()); | |||||
| // Looks like you're trying to launch a non-existent exe or a folder (perhaps on OSX | // Looks like you're trying to launch a non-existent exe or a folder (perhaps on OSX | ||||
| // you're trying to launch the .app folder rather than the actual binary inside it?) | // you're trying to launch the .app folder rather than the actual binary inside it?) | ||||
| jassert ((! arguments[0].containsChar ('/')) | |||||
| || File::getCurrentWorkingDirectory().getChildFile (arguments[0]).existsAsFile()); | |||||
| jassert (File::getCurrentWorkingDirectory().getChildFile (exe).existsAsFile()); | |||||
| int pipeHandles[2] = { 0 }; | int pipeHandles[2] = { 0 }; | ||||
| @@ -1078,11 +1079,11 @@ public: | |||||
| Array<char*> argv; | Array<char*> argv; | ||||
| for (int i = 0; i < arguments.size(); ++i) | for (int i = 0; i < arguments.size(); ++i) | ||||
| if (arguments[i].isNotEmpty()) | if (arguments[i].isNotEmpty()) | ||||
| argv.add (const_cast<char*> (arguments[i].toUTF8().getAddress())); | |||||
| argv.add (const_cast<char*> (arguments[i].toRawUTF8())); | |||||
| argv.add (nullptr); | argv.add (nullptr); | ||||
| execvp (argv[0], argv.getRawDataPointer()); | |||||
| execvp (exe.toRawUTF8(), argv.getRawDataPointer()); | |||||
| exit (-1); | exit (-1); | ||||
| } | } | ||||
| else | else | ||||