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
Родитель 9e2f6de16a
Коммит 796d454195
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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