diff options
author | Melanie Thielker | 2008-09-30 10:50:41 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-30 10:50:41 +0000 |
commit | f00b24ff9e0379262b6576d119c5ec53b0cb166b (patch) | |
tree | 781291e9a06bf75b32ab4662fa47fc7486e626ca /OpenSim/Region/Application/OpenSim.cs | |
parent | Updates HttpServer with the updated version. Adds ProtocolVersion, Removed ... (diff) | |
download | opensim-SC_OLD-f00b24ff9e0379262b6576d119c5ec53b0cb166b.zip opensim-SC_OLD-f00b24ff9e0379262b6576d119c5ec53b0cb166b.tar.gz opensim-SC_OLD-f00b24ff9e0379262b6576d119c5ec53b0cb166b.tar.bz2 opensim-SC_OLD-f00b24ff9e0379262b6576d119c5ec53b0cb166b.tar.xz |
Allow create-region to load files from arbitrary locations
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 7 |
1 files changed, 6 insertions, 1 deletions
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 | |||
311 | 311 | ||
312 | case "create-region": | 312 | case "create-region": |
313 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); | 313 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); |
314 | CreateRegion(new RegionInfo(cmdparams[0], String.Format("{0}/{1}", regionsDir, cmdparams[1]), false), true); | 314 | string regionFile = String.Format("{0}/{1}", regionsDir, cmdparams[1]); |
315 | // Allow absolute and relative specifiers | ||
316 | if (cmdparams[1].StartsWith("/") || cmdparams[1].StartsWith("\\") || cmdparams[1].StartsWith("..")) | ||
317 | regionFile = cmdparams[1]; | ||
318 | |||
319 | CreateRegion(new RegionInfo(cmdparams[0], regionFile, false), true); | ||
315 | break; | 320 | break; |
316 | 321 | ||
317 | case "remove-region": | 322 | case "remove-region": |