Further apple fixes

This commit is contained in:
baldurk
2019-12-16 19:36:17 +00:00
parent b52e3746f9
commit 8a05f4f26e
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -27,6 +27,7 @@
#include <algorithm>
#include <map>
#include <set>
#include "api/replay/stringise.h"
#include "common/common.h"
#include "common/threading.h"
#include "hooks/hooks.h"
+2 -2
View File
@@ -423,10 +423,10 @@ static pid_t RunProcess(const char *app, const char *workingDir, const char *cmd
// handle funky apple .app folders that aren't actually executables
#if ENABLED(RDOC_APPLE)
if(appName.size() > 5 && appName.rfind(".app") == appName.size() - 4)
if(appName.size() > 5 && appName.endsWith(".app"))
{
rdcstr realAppName = appName + "/Contents/MacOS/" + get_basename(appName);
realAppName.erase(realAppName.size() - 4);
realAppName.erase(realAppName.size() - 4, ~0U);
if(FileIO::exists(realAppName.c_str()))
{