diff options
author | MW | 2009-02-21 14:45:10 +0000 |
---|---|---|
committer | MW | 2009-02-21 14:45:10 +0000 |
commit | a2546d58a8aa23f8533058b36d86f40ed5689627 (patch) | |
tree | c0b2bbe25089d4117a2cffc9d3b657a75a8cf10f | |
parent | Added missing header to a file (before chi11ken does it) (diff) | |
download | opensim-SC_OLD-a2546d58a8aa23f8533058b36d86f40ed5689627.zip opensim-SC_OLD-a2546d58a8aa23f8533058b36d86f40ed5689627.tar.gz opensim-SC_OLD-a2546d58a8aa23f8533058b36d86f40ed5689627.tar.bz2 opensim-SC_OLD-a2546d58a8aa23f8533058b36d86f40ed5689627.tar.xz |
Applied patch from mantis #3213. Which adds a check to create region command, to make sure the .xml is passed in the command arguments. Thanks BlueWall
-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 a0d5bd8..9f8add2 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -402,8 +402,13 @@ namespace OpenSim | |||
402 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); | 402 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); |
403 | string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]); | 403 | string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]); |
404 | // Allow absolute and relative specifiers | 404 | // Allow absolute and relative specifiers |
405 | if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..")) | 405 | if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..") || cmd[3].EndsWith(".xml")) |
406 | regionFile = cmd[3]; | 406 | regionFile = cmd[3]; |
407 | else | ||
408 | { | ||
409 | m_console.Error("Usage: create region <region name> <region_file.xml>"); | ||
410 | } | ||
411 | |||
407 | 412 | ||
408 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true); | 413 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true); |
409 | } | 414 | } |