Bug 841011 - Use the parent directory of XRE_EXECUTABLE_FILE to find autoconf file. r=bsmedberg

This commit is contained in:
Mike Hommey 2013-02-25 10:50:12 +01:00
parent 1b87d68343
commit afaf61fca2

View File

@ -27,6 +27,7 @@
#include "nsString.h"
#include "nsCRT.h"
#include "nspr.h"
#include "nsXULAppAPI.h"
extern PRLogModuleInfo *MCD;
@ -242,12 +243,12 @@ nsresult nsReadConfig::openAndEvaluateJSFile(const char *aFileName, int32_t obsc
nsCOMPtr<nsIInputStream> inStr;
if (isBinDir) {
nsCOMPtr<nsIFile> jsFile;
rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR,
rv = NS_GetSpecialDirectory(XRE_EXECUTABLE_FILE,
getter_AddRefs(jsFile));
if (NS_FAILED(rv))
return rv;
rv = jsFile->AppendNative(nsDependentCString(aFileName));
rv = jsFile->SetNativeLeafName(nsDependentCString(aFileName));
if (NS_FAILED(rv))
return rv;