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

GenericGridServerConcept
MW 2009-02-21 14:45:10 +00:00
parent adad703c9c
commit a2546d58a8
1 changed files with 6 additions and 1 deletions

View File

@ -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 <region name> <region_file.xml>");
}
CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true);
}