Stop assertions in viewer when you can't get localstore.

This commit is contained in:
waterson%netscape.com 1999-08-04 02:19:55 +00:00
Родитель de79b4a18c
Коммит 993be7ae9a
1 изменённых файлов: 13 добавлений и 18 удалений

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

@ -306,26 +306,21 @@ static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
// still deal reasonably (in the short term) when no
// localstore.rdf is installed in the profile directory.
nsFileSpec spec;
nsFileSpec spec;
do {
NS_WITH_SERVICE(nsIProfile, profile, kProfileCID, &rv);
if (NS_SUCCEEDED(rv))
{
if (NS_SUCCEEDED(rv = profile->GetCurrentProfileDir(&spec)))
{
spec += "localstore.rdf";
}
}
else
{
#ifdef DEBUG
nsSpecialSystemDirectory spec2(nsSpecialSystemDirectory::OS_CurrentProcessDirectory);
spec2 += "localstore.rdf";
spec = spec2;
rv = NS_OK;
#endif
}
} while(0);
if (NS_FAILED(rv)) break;
rv = profile->GetCurrentProfileDir(&spec);
if (NS_FAILED(rv)) break;
} while (0);
if (NS_FAILED(rv)) {
// XXX We should probably tell the user that we're doing this.
spec = nsSpecialSystemDirectory(nsSpecialSystemDirectory::OS_TemporaryDirectory);
}
spec += "localstore.rdf";
if (! spec.Exists())
{