aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 3149eaa..adf7967 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -315,8 +315,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController
315 315
316 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>(); 316 ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
317 if (null == terrainModule) throw new Exception("terrain module not available"); 317 if (null == terrainModule) throw new Exception("terrain module not available");
318 terrainModule.LoadFromFile(file); 318 if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
319 319 {
320 m_log.Info("[RADMIN]: Terrain path is URL");
321 Uri result;
322 if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result))
323 {
324 // the url is valid
325 string fileType = file.Substring(file.LastIndexOf('/') + 1);
326 terrainModule.LoadFromStream(fileType, result);
327 }
328 }
329 else
330 {
331 terrainModule.LoadFromFile(file);
332 }
320 responseData["success"] = false; 333 responseData["success"] = false;
321 334
322 response.Value = responseData; 335 response.Value = responseData;