diff options
author | idb | 2009-04-05 10:31:18 +0000 |
---|---|---|
committer | idb | 2009-04-05 10:31:18 +0000 |
commit | 4e8723ad3fd52e24af3a4b0fb848e62d4c3a2519 (patch) | |
tree | eee9430150175c6ddd175ceba36d9393e506d4df /OpenSim/Region/Application | |
parent | * Fixing SVN properties (diff) | |
download | opensim-SC-4e8723ad3fd52e24af3a4b0fb848e62d4c3a2519.zip opensim-SC-4e8723ad3fd52e24af3a4b0fb848e62d4c3a2519.tar.gz opensim-SC-4e8723ad3fd52e24af3a4b0fb848e62d4c3a2519.tar.bz2 opensim-SC-4e8723ad3fd52e24af3a4b0fb848e62d4c3a2519.tar.xz |
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
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 5e7420b..8ebf144 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -409,7 +409,7 @@ namespace OpenSim | |||
409 | 409 | ||
410 | private void HandleCreateRegion(string module, string[] cmd) | 410 | private void HandleCreateRegion(string module, string[] cmd) |
411 | { | 411 | { |
412 | if (cmd.Length < 4) | 412 | if (cmd.Length < 4 || !cmd[3].EndsWith(".xml")) |
413 | { | 413 | { |
414 | m_console.Error("Usage: create region <region name> <region_file.xml>"); | 414 | m_console.Error("Usage: create region <region name> <region_file.xml>"); |
415 | return; | 415 | return; |
@@ -418,14 +418,8 @@ namespace OpenSim | |||
418 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); | 418 | string regionsDir = ConfigSource.Source.Configs["Startup"].GetString("regionload_regionsdir", "Regions").Trim(); |
419 | string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]); | 419 | string regionFile = String.Format("{0}/{1}", regionsDir, cmd[3]); |
420 | // Allow absolute and relative specifiers | 420 | // Allow absolute and relative specifiers |
421 | if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..") || cmd[3].EndsWith(".xml")) | 421 | if (cmd[3].StartsWith("/") || cmd[3].StartsWith("\\") || cmd[3].StartsWith("..")) |
422 | { | ||
423 | regionFile = cmd[3]; | 422 | regionFile = cmd[3]; |
424 | } | ||
425 | else | ||
426 | { | ||
427 | m_console.Error("Usage: create region <region name> <region_file.xml>"); | ||
428 | } | ||
429 | 423 | ||
430 | IScene scene; | 424 | IScene scene; |
431 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene); | 425 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene); |
@@ -1111,4 +1105,4 @@ namespace OpenSim | |||
1111 | 1105 | ||
1112 | #endregion | 1106 | #endregion |
1113 | } | 1107 | } |
1114 | } \ No newline at end of file | 1108 | } |