diff options
author | Michael Mi <mmi@openoffice.org> | 2004-07-19 09:09:14 +0000 |
---|---|---|
committer | Michael Mi <mmi@openoffice.org> | 2004-07-19 09:09:14 +0000 |
commit | 8a806a89624e279d23f50a67cea8df1503b17d54 (patch) | |
tree | d90351f8a417cdf813a7f9038d9b5d7d6943eec8 | |
parent | e78005be59dd68aded159c97160b9dbdbd83c3e6 (diff) |
nss profile supporting
Issue number:
Submitted by:
Reviewed by:
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx index 9d5a7e644cbe..8e755c238993 100644 --- a/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/seinitializer_nssimpl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: seinitializer_nssimpl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: mmi $ $Date: 2004-07-19 07:36:28 $ + * last change: $Author: mmi $ $Date: 2004-07-19 10:09:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -131,6 +131,17 @@ char* getCurrentProfilePath( ) { nsCOMPtr<nsILocalFile> binDir; + // Note: if getenv() returns NULL, mozilla will default to using MOZILLA_FIVE_HOME in the NS_InitXPCOM2() + // The NS_NewNativeLocalFile() will accept NULL as its first parameter. + char * env = getenv("OPENOFFICE_MOZILLA_FIVE_HOME"); + if (env) + { + nsDependentCString sPath(env); + nsresult rv = NS_NewNativeLocalFile(sPath, PR_TRUE, getter_AddRefs(binDir)); + if (NS_FAILED(rv)) + return NULL; + } + if (sServiceManager == nsnull) { NS_InitXPCOM2(&sServiceManager, binDir, appFileLocProvider); |