mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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 #3386
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user