diff options
author | Melanie | 2009-12-05 19:53:54 +0000 |
---|---|---|
committer | Melanie | 2009-12-05 19:53:54 +0000 |
commit | 43a6fa1d01707fda74b8ba7c2d9fb95210463b6a (patch) | |
tree | 77c5897901544e82467b1cdfafdc63644ee821ef /OpenSim/ApplicationPlugins | |
parent | Merge branch 'master' into careminster (diff) | |
parent | * Fix line endings in BaseHttpServer.cs (diff) | |
download | opensim-SC_OLD-43a6fa1d01707fda74b8ba7c2d9fb95210463b6a.zip opensim-SC_OLD-43a6fa1d01707fda74b8ba7c2d9fb95210463b6a.tar.gz opensim-SC_OLD-43a6fa1d01707fda74b8ba7c2d9fb95210463b6a.tar.bz2 opensim-SC_OLD-43a6fa1d01707fda74b8ba7c2d9fb95210463b6a.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 325816d..b22003c 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -413,8 +413,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
413 | 413 | ||
414 | ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>(); | 414 | ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>(); |
415 | if (null == terrainModule) throw new Exception("terrain module not available"); | 415 | if (null == terrainModule) throw new Exception("terrain module not available"); |
416 | terrainModule.LoadFromFile(file); | 416 | if (Uri.IsWellFormedUriString(file, UriKind.Absolute)) |
417 | 417 | { | |
418 | m_log.Info("[RADMIN]: Terrain path is URL"); | ||
419 | Uri result; | ||
420 | if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result)) | ||
421 | { | ||
422 | // the url is valid | ||
423 | string fileType = file.Substring(file.LastIndexOf('/') + 1); | ||
424 | terrainModule.LoadFromStream(fileType, result); | ||
425 | } | ||
426 | } | ||
427 | else | ||
428 | { | ||
429 | terrainModule.LoadFromFile(file); | ||
430 | } | ||
418 | responseData["success"] = false; | 431 | responseData["success"] = false; |
419 | 432 | ||
420 | response.Value = responseData; | 433 | response.Value = responseData; |