X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62705a278a57b8d3dd67222f20b161584a86982d..222702b112dcc7bebe018d6f4d66fe469fefd02c:/src/unix/utilsunx.cpp?ds=sidebyside diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 072a66b54a..4d670f4ea0 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -315,7 +315,11 @@ long wxExecute( const wxString& command, int flags, wxProcess *process ) long lRc; #if defined(__DARWIN__) - if( (lRc = wxMacExecute(argv, flags, process)) != -1) + // wxMacExecute only executes app bundles. + // It returns an error code if the target is not an app bundle, thus falling + // through to the regular wxExecute for non app bundles. + lRc = wxMacExecute(argv, flags, process); + if( lRc != ((flags & wxEXEC_SYNC) ? -1 : 0)) return lRc; #endif