Process::openDocument parameter: path with a space is handled incorrectly


Let's say I call File("/Applications/Audacity/").startAsProcess(...) to open a file with Audacity. The path to the file is given as an argument to startAsProcess().

When this path contains a space things go haywire. Even if I place quotes around the path, or prepend all spaces with a \ (which is common under OSX), this is handled incorrectly. The parameters are split correctly in openDocument(), but apparently not passed to the application as they should. What is going wrong?

File application("/Applications/");

I've validated the path name and it is correct. TextEdit shows me a dialog box saying it can't open the file given, twice. Once for the path pre-space, and once for post-space.