summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter/client/crashreporter.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:21:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:21:16 +0000
commitdff06b6adc3a5183dccd4dc2ef47ef7053ca7e99 (patch)
tree985e5b2434e3111cc12983a19e107d7122ace1ce /toolkit/crashreporter/client/crashreporter.cpp
parentAdding upstream version 115.10.0esr. (diff)
downloadfirefox-esr-dff06b6adc3a5183dccd4dc2ef47ef7053ca7e99.tar.xz
firefox-esr-dff06b6adc3a5183dccd4dc2ef47ef7053ca7e99.zip
Adding upstream version 115.11.0esr.upstream/115.11.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/crashreporter/client/crashreporter.cpp')
-rw-r--r--toolkit/crashreporter/client/crashreporter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/toolkit/crashreporter/client/crashreporter.cpp b/toolkit/crashreporter/client/crashreporter.cpp
index a14ea14fbc..fa3d51762d 100644
--- a/toolkit/crashreporter/client/crashreporter.cpp
+++ b/toolkit/crashreporter/client/crashreporter.cpp
@@ -544,7 +544,12 @@ string GetProgramPath(const string& exename) {
// The other applications we ship with Firefox are stored in the main bundle
// (Firefox.app/Contents/MacOS/) so we we need to go back three directories
// to reach them.
- path.append("../../../");
+ path.erase(pos - 1);
+ for (size_t i = 0; i < 3; i++) {
+ pos = path.rfind(UI_DIR_SEPARATOR, pos - 1);
+ }
+
+ path.erase(pos + 1);
#endif // XP_MACOSX
path.append(exename + BIN_SUFFIX);