* 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.

0.6.0-stable
Adam Frisby 2008-04-11 04:21:29 +00:00
parent f100fc1b94
commit 00b8e04ece
2 changed files with 16 additions and 0 deletions

View File

@ -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);

View File

@ -1,6 +1,9 @@
[Startup]
gridmode = false
; Determines where the region XML files are stored.
; regionload_regionsdir="C:\somewhere\xmlfiles\"
; ##
; ## STORAGE
; ##