bug# 29063: Removing about a 100 calls to stat() on startup. r=alecf,racham a=jar

This commit is contained in:
dp%netscape.com 2000-02-28 15:57:13 +00:00
parent c37e88e9c1
commit a420f03496

View File

@ -155,14 +155,17 @@ static PRBool GetProfileDirectory(nsFileSpec& outSpec)
{
delete gProfileDir; // All that for nothing. sigh.
gProfileDir = nsnull;
return PR_FALSE;
}
NS_ASSERTION(*gProfileDir == currProfileDirSpec, "Profile spec does not match!");
if (!gProfileDir->Exists())
gProfileDir->CreateDir();
}
if (!gProfileDir)
return PR_FALSE;
if (!gProfileDir->Exists())
gProfileDir->CreateDir();
outSpec = *gProfileDir;
return PR_TRUE;
} // GetProfileDirectory