* minor: make control file loading code consistent
parent
15b8641bef
commit
4e526778b7
|
@ -135,8 +135,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH))
|
else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH))
|
||||||
{
|
{
|
||||||
LoadRegionSettings(filePath, data);
|
LoadRegionSettings(filePath, data);
|
||||||
} else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) {
|
}
|
||||||
LoadArchiveMetadata(filePath, data);
|
else if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
|
||||||
|
{
|
||||||
|
LoadControlFile(filePath, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,14 +485,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Load oar file metadata
|
/// Load oar control file
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="terrainPath"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="data"></param>
|
/// <param name="data"></param>
|
||||||
/// <returns>
|
private void LoadControlFile(string path, byte[] data)
|
||||||
/// true if terrain was resolved successfully, false otherwise.
|
|
||||||
/// </returns>
|
|
||||||
private bool LoadArchiveMetadata(string terrainPath, byte[] data)
|
|
||||||
{
|
{
|
||||||
//Create the XmlNamespaceManager.
|
//Create the XmlNamespaceManager.
|
||||||
NameTable nt = new NameTable();
|
NameTable nt = new NameTable();
|
||||||
|
@ -499,9 +498,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
// Create the XmlParserContext.
|
// 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(m_asciiEncoding.GetString(data),
|
XmlTextReader xtr
|
||||||
XmlNodeType.Document, context);
|
= new XmlTextReader(m_asciiEncoding.GetString(data), XmlNodeType.Document, context);
|
||||||
|
|
||||||
|
|
||||||
RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
|
RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
|
||||||
|
|
||||||
|
@ -533,8 +531,5 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||||
|
|
||||||
// Write out control file
|
// Write out control file
|
||||||
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
|
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
|
||||||
|
|
||||||
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
|
||||||
|
|
||||||
// Write out region settings
|
// Write out region settings
|
||||||
|
|
Loading…
Reference in New Issue