mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -413,8 +413,21 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
|
||||
ITerrainModule terrainModule = region.RequestModuleInterface<ITerrainModule>();
|
||||
if (null == terrainModule) throw new Exception("terrain module not available");
|
||||
terrainModule.LoadFromFile(file);
|
||||
|
||||
if (Uri.IsWellFormedUriString(file, UriKind.Absolute))
|
||||
{
|
||||
m_log.Info("[RADMIN]: Terrain path is URL");
|
||||
Uri result;
|
||||
if (Uri.TryCreate(file, UriKind.RelativeOrAbsolute, out result))
|
||||
{
|
||||
// the url is valid
|
||||
string fileType = file.Substring(file.LastIndexOf('/') + 1);
|
||||
terrainModule.LoadFromStream(fileType, result);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
terrainModule.LoadFromFile(file);
|
||||
}
|
||||
responseData["success"] = false;
|
||||
|
||||
response.Value = responseData;
|
||||
|
||||
Reference in New Issue
Block a user