* minor: make control file loading code consistent

0.6.6-post-fixes
Justin Clarke Casey 2009-06-12 14:18:01 +00:00
parent 15b8641bef
commit 4e526778b7
2 changed files with 12 additions and 18 deletions

View File

@ -135,8 +135,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH))
{
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>
/// Load oar file metadata
/// Load oar control file
/// </summary>
/// <param name="terrainPath"></param>
/// <param name="path"></param>
/// <param name="data"></param>
/// <returns>
/// true if terrain was resolved successfully, false otherwise.
/// </returns>
private bool LoadArchiveMetadata(string terrainPath, byte[] data)
private void LoadControlFile(string path, byte[] data)
{
//Create the XmlNamespaceManager.
NameTable nt = new NameTable();
@ -499,9 +498,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// Create the XmlParserContext.
XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
XmlTextReader xtr = new XmlTextReader(m_asciiEncoding.GetString(data),
XmlNodeType.Document, context);
XmlTextReader xtr
= new XmlTextReader(m_asciiEncoding.GetString(data), XmlNodeType.Document, context);
RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
@ -533,8 +531,5 @@ namespace OpenSim.Region.CoreModules.World.Archiver
return true;
}
}
}

View File

@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// Write out control file
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
// Write out region settings