mirror of
https://github.com/opensim/opensim.git
synced 2026-07-18 21:55:37 +08:00
* Added a "regionload_regionsdir" option to OpenSim.ini which determines where Region.XML files are stored. If not set, it will default to the usual location.
This commit is contained in:
@@ -32,14 +32,27 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
|
||||
{
|
||||
public class RegionLoaderFileSystem : IRegionLoader
|
||||
{
|
||||
private IniConfigSource m_configSouce;
|
||||
|
||||
public void SetIniConfigSource(IniConfigSource configSource)
|
||||
{
|
||||
m_configSouce = configSource;
|
||||
}
|
||||
|
||||
public RegionInfo[] LoadRegions()
|
||||
{
|
||||
string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
|
||||
|
||||
try
|
||||
{
|
||||
IniConfig startupConfig = (IniConfig)m_configSouce.Configs["Startup"];
|
||||
regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim();
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
// No INI setting recorded.
|
||||
}
|
||||
|
||||
if (!Directory.Exists(regionConfigPath))
|
||||
{
|
||||
Directory.CreateDirectory(regionConfigPath);
|
||||
|
||||
Reference in New Issue
Block a user