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,12 +159,26 @@ namespace OpenSim
|
||||||
protected virtual void LoadPlugins()
|
protected virtual void LoadPlugins()
|
||||||
{
|
{
|
||||||
IConfig startupConfig = Config.Configs["Startup"];
|
IConfig startupConfig = Config.Configs["Startup"];
|
||||||
string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation",".") : ".";
|
string registryLocation = (startupConfig != null) ? startupConfig.GetString("RegistryLocation", String.Empty) : String.Empty;
|
||||||
|
|
||||||
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this), registryLocation))
|
// 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)
|
||||||
{
|
{
|
||||||
loader.Load("/OpenSim/Startup");
|
using (PluginLoader<IApplicationPlugin> loader = new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this)))
|
||||||
m_plugins = loader.Plugins;
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue