mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 325450 - nsGREGlue check of GRE_HOME needs to add /libxpcom.so, r=darin
This commit is contained in:
parent
a93a7ba7f6
commit
b4e4416610
@ -154,21 +154,25 @@ GRE_GetGREPathWithProperties(const GREVersionRange *versions,
|
|||||||
// if GRE_HOME is in the environment, use that GRE
|
// if GRE_HOME is in the environment, use that GRE
|
||||||
const char* env = getenv("GRE_HOME");
|
const char* env = getenv("GRE_HOME");
|
||||||
if (env && *env) {
|
if (env && *env) {
|
||||||
|
char p[MAXPATHLEN];
|
||||||
|
snprintf(p, sizeof(p), "%s" XPCOM_FILE_PATH_SEPARATOR XPCOM_DLL, env);
|
||||||
|
p[sizeof(p) - 1] = '\0';
|
||||||
|
|
||||||
#if XP_UNIX
|
#if XP_UNIX
|
||||||
if (realpath(env, aBuffer))
|
if (realpath(p, aBuffer))
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
#elif XP_WIN
|
#elif XP_WIN
|
||||||
if (_fullpath(aBuffer, env, aBufLen))
|
if (_fullpath(aBuffer, p, aBufLen))
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
#else
|
#else
|
||||||
// hope for the best
|
// hope for the best
|
||||||
// xxxbsmedberg: other platforms should have a "make absolute" function
|
// xxxbsmedberg: other platforms should have a "make absolute" function
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (strlen(env) >= aBufLen)
|
if (strlen(p) >= aBufLen)
|
||||||
return NS_ERROR_FILE_NAME_TOO_LONG;
|
return NS_ERROR_FILE_NAME_TOO_LONG;
|
||||||
|
|
||||||
strcpy(aBuffer, env);
|
strcpy(aBuffer, p);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user