* 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.
parent
f100fc1b94
commit
00b8e04ece
|
@ -32,14 +32,27 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
|
||||||
{
|
{
|
||||||
public class RegionLoaderFileSystem : IRegionLoader
|
public class RegionLoaderFileSystem : IRegionLoader
|
||||||
{
|
{
|
||||||
|
private IniConfigSource m_configSouce;
|
||||||
|
|
||||||
public void SetIniConfigSource(IniConfigSource configSource)
|
public void SetIniConfigSource(IniConfigSource configSource)
|
||||||
{
|
{
|
||||||
|
m_configSouce = configSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RegionInfo[] LoadRegions()
|
public RegionInfo[] LoadRegions()
|
||||||
{
|
{
|
||||||
string regionConfigPath = Path.Combine(Util.configDir(), "Regions");
|
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))
|
if (!Directory.Exists(regionConfigPath))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(regionConfigPath);
|
Directory.CreateDirectory(regionConfigPath);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[Startup]
|
[Startup]
|
||||||
gridmode = false
|
gridmode = false
|
||||||
|
|
||||||
|
; Determines where the region XML files are stored.
|
||||||
|
; regionload_regionsdir="C:\somewhere\xmlfiles\"
|
||||||
|
|
||||||
; ##
|
; ##
|
||||||
; ## STORAGE
|
; ## STORAGE
|
||||||
; ##
|
; ##
|
||||||
|
|
Loading…
Reference in New Issue