summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorspycrab <spycrab@users.noreply.github.com>2019-02-26 21:56:27 +0100
committerGitHub <noreply@github.com>2019-02-26 21:56:27 +0100
commitf10fdce15815f587e7bf7a17f5ecfa34e47c8580 (patch)
tree8a97bfcbd20897a70c2e71544eea6682d7f5cb60 /Source/Core/Common/FileUtil.cpp
parent873d22b8b269fd2c268dbd1d309e5c19a455ce48 (diff)
parent3e3f6922c0f246da831fca7ab1f1d10d1d27eaaf (diff)
Merge pull request #7825 from spycrab/fileutil_osx_path
Common/FileUtil: Fix GetExePath() cutting off the bundle name
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index a631aa3edc..a5d5072929 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -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));