fix for bug 52653 regxpcom creates .mozilla in Real User's home

fix by shaver, r=dveditz, sr=scc


git-svn-id: svn://10.0.0.236/trunk@87229 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mac.com 2001-02-16 21:35:34 +00:00
parent 6c9ac5fa85
commit 74d561bd54
2 changed files with 22 additions and 20 deletions

View File

@ -426,15 +426,8 @@ NS_IMETHODIMP nsRegistry::Open( const char *regFile ) {
return regerr2nsresult( err );
}
/*----------------------------- nsRegistry::OpenWellKnownRegistry --------------
| Takes a registry id and maps that to a file name for opening. We first check |
| to see if a registry file is already open and close it if so. |
------------------------------------------------------------------------------*/
NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
{
REGERR err = REGERR_OK;
static void
EnsureDefaultRegistryDirectory() {
#ifdef XP_UNIX
// Create ~/.mozilla as that is the default place for the registry file
@ -484,7 +477,15 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
("nsComponentManager: Creating Directory %s", settingsMozillaDir));
}
#endif
}
/*----------------------------- nsRegistry::OpenWellKnownRegistry --------------
| Takes a registry id and maps that to a file name for opening. We first check |
| to see if a registry file is already open and close it if so. |
------------------------------------------------------------------------------*/
NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
{
REGERR err = REGERR_OK;
if (mCurRegID != nsIRegistry::None && mCurRegID != regid)
{
@ -532,7 +533,7 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
case ApplicationRegistry:
{
// can't use NS_GetSpecialDirectory here. Called before service manager is initialized.
EnsureDefaultRegistryDirectory();
nsCOMPtr<nsIProperties> directoryService;
rv = nsDirectoryService::Create(nsnull,
NS_GET_IID(nsIProperties),

View File

@ -426,15 +426,8 @@ NS_IMETHODIMP nsRegistry::Open( const char *regFile ) {
return regerr2nsresult( err );
}
/*----------------------------- nsRegistry::OpenWellKnownRegistry --------------
| Takes a registry id and maps that to a file name for opening. We first check |
| to see if a registry file is already open and close it if so. |
------------------------------------------------------------------------------*/
NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
{
REGERR err = REGERR_OK;
static void
EnsureDefaultRegistryDirectory() {
#ifdef XP_UNIX
// Create ~/.mozilla as that is the default place for the registry file
@ -484,7 +477,15 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
("nsComponentManager: Creating Directory %s", settingsMozillaDir));
}
#endif
}
/*----------------------------- nsRegistry::OpenWellKnownRegistry --------------
| Takes a registry id and maps that to a file name for opening. We first check |
| to see if a registry file is already open and close it if so. |
------------------------------------------------------------------------------*/
NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
{
REGERR err = REGERR_OK;
if (mCurRegID != nsIRegistry::None && mCurRegID != regid)
{
@ -532,7 +533,7 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid )
case ApplicationRegistry:
{
// can't use NS_GetSpecialDirectory here. Called before service manager is initialized.
EnsureDefaultRegistryDirectory();
nsCOMPtr<nsIProperties> directoryService;
rv = nsDirectoryService::Create(nsnull,
NS_GET_IID(nsIProperties),