aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2008-04-11 04:21:29 +0000
committerAdam Frisby2008-04-11 04:21:29 +0000
commit00b8e04eceab48cd1fb10791c3ddb55409ce3169 (patch)
tree15e2c49f72b681ad1c13e9795ff94ab3d4d40af7
parent* Updated MapImageModule to support primitives showing on the world map image... (diff)
downloadopensim-SC-00b8e04eceab48cd1fb10791c3ddb55409ce3169.zip
opensim-SC-00b8e04eceab48cd1fb10791c3ddb55409ce3169.tar.gz
opensim-SC-00b8e04eceab48cd1fb10791c3ddb55409ce3169.tar.bz2
opensim-SC-00b8e04eceab48cd1fb10791c3ddb55409ce3169.tar.xz
* 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.
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs13
-rw-r--r--bin/OpenSim.ini.example3
2 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
index 0902bee..ad8b4a0 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
+++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
@@ -32,14 +32,27 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
32{ 32{
33 public class RegionLoaderFileSystem : IRegionLoader 33 public class RegionLoaderFileSystem : IRegionLoader
34 { 34 {
35 private IniConfigSource m_configSouce;
36
35 public void SetIniConfigSource(IniConfigSource configSource) 37 public void SetIniConfigSource(IniConfigSource configSource)
36 { 38 {
39 m_configSouce = configSource;
37 } 40 }
38 41
39 public RegionInfo[] LoadRegions() 42 public RegionInfo[] LoadRegions()
40 { 43 {
41 string regionConfigPath = Path.Combine(Util.configDir(), "Regions"); 44 string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
42 45
46 try
47 {
48 IniConfig startupConfig = (IniConfig)m_configSouce.Configs["Startup"];
49 regionConfigPath = startupConfig.GetString("regionload_regionsdir", regionConfigPath).Trim();
50 }
51 catch (System.Exception)
52 {
53 // No INI setting recorded.
54 }
55
43 if (!Directory.Exists(regionConfigPath)) 56 if (!Directory.Exists(regionConfigPath))
44 { 57 {
45 Directory.CreateDirectory(regionConfigPath); 58 Directory.CreateDirectory(regionConfigPath);
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index cbf5591..85a24e6 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -1,6 +1,9 @@
1[Startup] 1[Startup]
2gridmode = false 2gridmode = false
3 3
4; Determines where the region XML files are stored.
5; regionload_regionsdir="C:\somewhere\xmlfiles\"
6
4; ## 7; ##
5; ## STORAGE 8; ## STORAGE
6; ## 9; ##