slightly simplify oar control file loading code
parent
460b9fffe5
commit
772dbf59f3
|
@ -483,15 +483,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
/// <param name="data"></param>
|
/// <param name="data"></param>
|
||||||
private void LoadControlFile(string path, byte[] data)
|
private void LoadControlFile(string path, byte[] data)
|
||||||
{
|
{
|
||||||
//Create the XmlNamespaceManager.
|
XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable());
|
||||||
NameTable nt = new NameTable();
|
|
||||||
XmlNamespaceManager nsmgr = new XmlNamespaceManager(nt);
|
|
||||||
|
|
||||||
// Create the XmlParserContext.
|
|
||||||
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
|
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
|
||||||
|
XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
|
||||||
XmlTextReader xtr
|
|
||||||
= new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context);
|
|
||||||
|
|
||||||
RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
|
RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
|
||||||
|
|
||||||
|
@ -530,7 +524,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
currentRegionSettings.LoadedCreationID = xtr.ReadElementContentAsString();
|
currentRegionSettings.LoadedCreationID = xtr.ReadElementContentAsString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentRegionSettings.Save();
|
currentRegionSettings.Save();
|
||||||
|
|
Loading…
Reference in New Issue