mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
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
This commit is contained in:
parent
d06e16500a
commit
af335e5bc8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user