From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../LoadRegions/RegionLoaderFileSystem.cs | 25 ++++++++-------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs') diff --git a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs index ea95696..976714c 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/RegionLoaderFileSystem.cs @@ -48,7 +48,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions public RegionInfo[] LoadRegions() { - string regionConfigPath = Util.configDir(); + string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); bool allowRegionless = false; try @@ -68,14 +68,13 @@ namespace OpenSim.ApplicationPlugins.LoadRegions } string[] configFiles = Directory.GetFiles(regionConfigPath, "*.xml"); -//// Causes hangs with the actual .ini files if they are in the same place. -//// string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); + string[] iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); // Create an empty Regions.ini if there are no existing config files. - if (!allowRegionless && configFiles.Length == 0 /*&& iniFiles.Length == 0*/) + if (!allowRegionless && configFiles.Length == 0 && iniFiles.Length == 0) { new RegionInfo("DEFAULT REGION CONFIG", Path.Combine(regionConfigPath, "Regions.ini"), false, m_configSource); -//// iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); + iniFiles = Directory.GetFiles(regionConfigPath, "*.ini"); } m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config files from {0}", regionConfigPath); @@ -83,7 +82,6 @@ namespace OpenSim.ApplicationPlugins.LoadRegions List regionInfos = new List(); int i = 0; -/* foreach (string file in iniFiles) { m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); @@ -100,22 +98,17 @@ namespace OpenSim.ApplicationPlugins.LoadRegions i++; } } -*/ + foreach (string file in configFiles) { m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loading config file {0}", file); - IConfigSource source = new XmlConfigSource(file); - - foreach (IConfig config in source.Configs) - { - RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource, config.Name); - regionInfos.Add(regionInfo); + RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), file, false, m_configSource); + regionInfos.Add(regionInfo); - m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName); + m_log.InfoFormat("[REGION LOADER FILE SYSTEM]: Loaded config for region {0}", regionInfo.RegionName); - i++; - } + i++; } return regionInfos.ToArray(); -- cgit v1.1