diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs index 0902beedb3..ad8b4a04dd 100644 --- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs +++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs @@ -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); diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index cbf559160c..85a24e61e3 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -1,6 +1,9 @@ [Startup] gridmode = false +; Determines where the region XML files are stored. +; regionload_regionsdir="C:\somewhere\xmlfiles\" + ; ## ; ## STORAGE ; ##