The new method of autoregistration is really simple. A NULL for the

directory will do the right thing.
This commit is contained in:
dp%netscape.com 1999-06-22 15:19:31 +00:00
Родитель a5f317d35d
Коммит 09c4d8e4fc
1 изменённых файлов: 1 добавлений и 13 удалений

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

@ -128,19 +128,7 @@ get_applocale(void)
////////////////////////////////////////////////////////////////////////////////////////////////////
nsresult NS_AutoregisterComponents()
{
nsIFileSpec* spec = NS_LocateFileOrDirectory(
nsSpecialFileSpec::App_ComponentsDirectory);
if (!spec)
return NS_ERROR_FAILURE;
char *componentsDirPath;
nsresult rv = spec->GetNSPRPath(&componentsDirPath);
if (NS_FAILED(rv))
return rv;
if (componentsDirPath)
rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, componentsDirPath);
NS_RELEASE(spec);
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, NULL /* default */);
return rv;
}