aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Application/OpenSim.cs12
1 files changed, 3 insertions, 9 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 5e7420b..8ebf144 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -409,7 +409,7 @@ namespace OpenSim
409 409
410 private void HandleCreateRegion(string module, string[] cmd) 410 private void HandleCreateRegion(string module, string[] cmd)
411 { 411 {
412 if (cmd.Length < 4) 412 if (cmd.Length < 4 || !cmd[3].EndsWith(".xml"))
413 { 413 {
414 m_console.Error("Usage: create region <region name> <region_file.xml>"); 414 m_console.Error("Usage: create region <region name> <region_file.xml>");
415 return; 415 return;
@@ -418,14 +418,8 @@ namespace OpenSim
418 string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); 418 string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
419 string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]); 419 string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]);
420 // Allow absolute and relative specifiers 420 // Allow absolute and relative specifiers
421 if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..") || cmd[3].EndsWith(".xml")) 421 if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith(".."))
422 {
423 regionFile = cmd[3]; 422 regionFile = cmd[3];
424 }
425 else
426 {
427 m_console.Error("Usage: create region <region name> <region_file.xml>");
428 }
429 423
430 IScene scene; 424 IScene scene;
431 CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene); 425 CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene);
@@ -1111,4 +1105,4 @@ namespace OpenSim
1111 1105
1112 #endregion 1106 #endregion
1113 } 1107 }
1114} \ No newline at end of file 1108}