From f00b24ff9e0379262b6576d119c5ec53b0cb166b Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 30 Sep 2008 10:50:41 +0000 Subject: Allow create-region to load files from arbitrary locations --- OpenSim/Framework/RegionInfo.cs | 5 +++++ OpenSim/Region/Application/OpenSim.cs | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 5cbc776..34a69d7 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -217,6 +217,11 @@ namespace OpenSim.Framework // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. + // MT: Yes. Estates can't span trust boundaries. Therefore, it can be + // assumed that all instances belonging to one estate are able to + // access the same database server. Since estate settings are lodaed + // from there, that should be sufficient for full remote administration + public RegionInfo(string description, string filename, bool skipConsoleConfig) { configMember = diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 0b3d5df..1e2b8a5 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -311,7 +311,12 @@ namespace OpenSim case "create-region": string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); - CreateRegion(new RegionInfo(cmdparams[0], String.Format("{0}/{1}", regionsDir, cmdparams[1]), false), true); + string regionFile = String.Format("{0}/{1}", regionsDir, cmdparams[1]); + // Allow absolute and relative specifiers + if (cmdparams[1].StartsWith("/") || cmdparams[1].StartsWith("\\") || cmdparams[1].StartsWith("..")) + regionFile = cmdparams[1]; + + CreateRegion(new RegionInfo(cmdparams[0], regionFile, false), true); break; case "remove-region": -- cgit v1.1