Merge pull request #7825 from spycrab/fileutil_osx_path

Common/FileUtil: Fix GetExePath() cutting off the bundle name
This commit is contained in:
spycrab 2019-02-26 21:56:27 +01:00 committed by GitHub
commit f10fdce158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -686,7 +686,8 @@ std::string GetExePath()
dolphin_path = TStrToUTF8(dolphin_exe_path);
#elif defined(__APPLE__)
dolphin_path = GetBundleDirectory();
dolphin_path = dolphin_path.substr(0, dolphin_path.find_last_of("Dolphin.app/Contents/MacOS"));
dolphin_path =
dolphin_path.substr(0, dolphin_path.find_last_of("Dolphin.app/Contents/MacOS") + 1);
#else
char dolphin_exe_path[PATH_MAX];
ssize_t len = ::readlink("/proc/self/exe", dolphin_exe_path, sizeof(dolphin_exe_path));