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
parent
adad703c9c
commit
a2546d58a8
|
@ -402,8 +402,13 @@ namespace OpenSim
|
||||||
string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
|
string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim();
|
||||||
string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]);
|
string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]);
|
||||||
// Allow absolute and relative specifiers
|
// 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];
|
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);
|
CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue