Skip to content
Snippets Groups Projects
Commit af335e5b authored by Gabriele Svelto's avatar Gabriele Svelto
Browse files

Bug 1882080 - Don't use double dots in the path used to restart Firefox on...

Bug 1882080 - Don't use double dots in the path used to restart Firefox on macOS r=afranchuk, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D202789
parent d06e1650
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment