23 lines
778 B
Diff
23 lines
778 B
Diff
|
|
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
|
||
|
|
index 6db876975187..5882c5d7f1d6 100644
|
||
|
|
--- a/toolkit/xre/nsXREDirProvider.cpp
|
||
|
|
+++ b/toolkit/xre/nsXREDirProvider.cpp
|
||
|
|
@@ -11,6 +11,7 @@
|
||
|
|
|
||
|
|
#include "jsapi.h"
|
||
|
|
#include "xpcpublic.h"
|
||
|
|
+#include "prenv.h"
|
||
|
|
#include "prprf.h"
|
||
|
|
|
||
|
|
#include "nsIAppStartup.h"
|
||
|
|
@@ -297,7 +297,8 @@ static nsresult GetSystemParentDirectory(nsIFile** aFile) {
|
||
|
|
"/usr/lib/mozilla"_ns
|
||
|
|
# endif
|
||
|
|
;
|
||
|
|
- rv = NS_NewNativeLocalFile(dirname, getter_AddRefs(localDir));
|
||
|
|
+ const char* pathVar = PR_GetEnv("MOZ_SYSTEM_DIR");
|
||
|
|
+ rv = NS_NewNativeLocalFile((pathVar && *pathVar) ? nsDependentCString(pathVar) : reinterpret_cast<const nsCString&>(dirname), getter_AddRefs(localDir));
|
||
|
|
# endif
|
||
|
|
|
||
|
|
if (NS_SUCCEEDED(rv)) {
|