Allow the setting from the environment to take effect if no explicit setting is given.
This is done by calling the constructor only with a directory if one is actually given.0.8.0.3
parent
3d0778bcd6
commit
a4d322dcd1
|
@ -159,14 +159,28 @@ namespace OpenSim
|
|||
protected virtual void LoadPlugins()
|
||||
{
|
||||
IConfig startupConfig = Config.Configs["Startup"];
|
||||
string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation",".") : ".";
|
||||
string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation", String.Empty) : String.Empty;
|
||||
|
||||
// The location can also be specified in the environment. If there
|
||||
// is no location in the configuration, we must call the constructor
|
||||
// without a location parameter to allow that to happen.
|
||||
if (registryLocation == String.Empty)
|
||||
{
|
||||
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)))
|
||||
{
|
||||
loader.Load("/OpenSim/Startup");
|
||||
m_plugins = loader.Plugins;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation))
|
||||
{
|
||||
loader.Load("/OpenSim/Startup");
|
||||
m_plugins = loader.Plugins;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override List<string> GetHelpTopics()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue