Fix IO redirection for async execution in wxOSX

Don't try running non-bundled applications in wxCocoaLaunch(): this
prevents the code handling IO redirection from being used.

Check that we have a bundle, just like wxMacaunch(), used until
5b6af7002c, used to do.

Closes #18552.

See https://github.com/wxWidgets/wxWidgets/pull/1561
This commit is contained in:
Vadim Zeitlin
2019-10-31 18:59:34 +01:00
parent d967940035
commit 9d24a13c4b

View File

@@ -217,6 +217,14 @@ bool wxCocoaLaunch(const char* const* argv, pid_t &pid)
return false ;
}
// Don't try running non-bundled applications here, we don't support output
// redirection, which is important for them, unlike for the bundled apps,
// so let the generic Unix code handle them.
if ( [NSBundle bundleWithURL:url] == nil )
{
return false;
}
// Loop through command line arguments to the bundle,
// turn them into CFURLs and then put them in cfaFiles
// For use to launch services call