From 00b8e04eceab48cd1fb10791c3ddb55409ce3169 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 11 Apr 2008 04:21:29 +0000 Subject: [PATCH] * 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. --- .../Filesystem/RegionLoaderFileSystem.cs | 13 +++++++++++++ bin/OpenSim.ini.example | 3 +++ 2 files changed, 16 insertions(+) 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 ; ##