Directory defaults for region xml files when creating a new region got changed/lost with svn 8550 when a check was added for the file name having .xml extension. The extension check has been moved slightly earlier and the original directory logic restored.
Fixes Mantis #33860.6.5-rc1
parent
cf1e8b1723
commit
4e8723ad3f
|
@ -409,7 +409,7 @@ namespace OpenSim
|
|||
|
||||
private void HandleCreateRegion(string module, string[] cmd)
|
||||
{
|
||||
if (cmd.Length < 4)
|
||||
if (cmd.Length < 4 || !cmd[3].EndsWith(".xml"))
|
||||
{
|
||||
m_console.Error("Usage: create region <region name> <region_file.xml>");
|
||||
return;
|
||||
|
@ -418,14 +418,8 @@ 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("..") || cmd[3].EndsWith(".xml"))
|
||||
{
|
||||
if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith(".."))
|
||||
regionFile = cmd[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
m_console.Error("Usage: create region <region name> <region_file.xml>");
|
||||
}
|
||||
|
||||
IScene scene;
|
||||
CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene);
|
||||
|
@ -1111,4 +1105,4 @@ namespace OpenSim
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue