mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backed out changeset 855eb2e4c43d (bug 1434666) for bricking installation on Ubuntu 14.04 (bug 1441449). a=backout CLOSED TREE
This commit is contained in:
parent
14d9332462
commit
7cb1beb438
@ -382,18 +382,11 @@ AppendToLibPath(const char *pathToAppend)
|
||||
// Leak the string because that is required by PR_SetEnv.
|
||||
char *s = Smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend).release();
|
||||
PR_SetEnv(s);
|
||||
} else {
|
||||
// Check if pathToAppend is present in pathValue, properly delimited.
|
||||
// For example, if pathValue = "/A/B/C/D" and pathToAppend = "/A/B/C"
|
||||
// then check if ":/A/B/C/D:" contains ":/A/B/C:" (answer: no).
|
||||
char *pathValue_sep = Smprintf(PATH_SEPARATOR "%s" PATH_SEPARATOR, pathValue).get();
|
||||
char *pathToAppend_sep = Smprintf(PATH_SEPARATOR "%s" PATH_SEPARATOR, pathToAppend).get();
|
||||
if (!strstr(pathValue_sep, pathToAppend_sep)) {
|
||||
// Leak the string because that is required by PR_SetEnv.
|
||||
char *s = Smprintf("%s=%s" PATH_SEPARATOR "%s",
|
||||
LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend, pathValue).release();
|
||||
PR_SetEnv(s);
|
||||
}
|
||||
} else if (!strstr(pathValue, pathToAppend)) {
|
||||
// Leak the string because that is required by PR_SetEnv.
|
||||
char *s = Smprintf("%s=%s" PATH_SEPARATOR "%s",
|
||||
LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend, pathValue).release();
|
||||
PR_SetEnv(s);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user