From a2546d58a8aa23f8533058b36d86f40ed5689627 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 21 Feb 2009 14:45:10 +0000 Subject: 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 --- OpenSim/Region/Application/OpenSim.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Application') 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 string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]); // Allow absolute and relative specifiers - if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..")) + if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..") || cmd[3].EndsWith(".xml")) regionFile = cmd[3]; + else + { + m_console.Error("Usage: create region "); + } + CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true); } -- cgit v1.1