dougt%netscape.com 2000-07-06 02:05:51 +00:00
Родитель 0beb9ebea4
Коммит c5f75a46b4
1 изменённых файлов: 23 добавлений и 8 удалений

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

@ -1451,6 +1451,8 @@ extern "C" JSBool pref_InitInitialObjects()
{ {
JSBool funcResult; JSBool funcResult;
nsresult rv; nsresult rv;
PRBool exists;
NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv); NS_WITH_SERVICE(nsIFileLocator, locator, kFileLocatorCID, &rv);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return JS_TRUE; return JS_TRUE;
@ -1500,6 +1502,14 @@ extern "C" JSBool pref_InitInitialObjects()
goto done; goto done;
} }
if (NS_FAILED(specialChild->Exists(&exists)))
{
funcResult = JS_FALSE;
goto done;
}
if (exists)
{
worked = (JSBool)(pref_OpenFileSpec( worked = (JSBool)(pref_OpenFileSpec(
specialChild, specialChild,
PR_FALSE, PR_FALSE,
@ -1507,6 +1517,7 @@ extern "C" JSBool pref_InitInitialObjects()
PR_FALSE, PR_FALSE,
PR_FALSE) == PREF_NOERROR); PR_FALSE) == PREF_NOERROR);
NS_ASSERTION(worked, "initpref.js not parsed successfully"); NS_ASSERTION(worked, "initpref.js not parsed successfully");
}
// Keep this child // Keep this child
#ifdef DEBUG_prefs #ifdef DEBUG_prefs
@ -1604,10 +1615,14 @@ extern "C" JSBool pref_InitInitialObjects()
if (NS_FAILED(specialChild2->AppendRelativeUnixPath((char*)specialFiles[k]))) if (NS_FAILED(specialChild2->AppendRelativeUnixPath((char*)specialFiles[k])))
continue; continue;
#ifdef DEBUG_prefs #ifdef DEBUG_prefs
printf("Parsing %s\n", specialFiles[k]); printf("Parsing %s\n", specialFiles[k]);
#endif /* DEBUG_prefs */ #endif /* DEBUG_prefs */
if (NS_FAILED(specialChild2->Exists(&exists)))
continue;
worked = (JSBool)(pref_OpenFileSpec( worked = (JSBool)(pref_OpenFileSpec(
specialChild2, specialChild2,
PR_FALSE, PR_FALSE,