aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs29
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs1
2 files changed, 12 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index e26c145..fd58e80 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -135,8 +135,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
135 else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH)) 135 else if (!m_merge && filePath.StartsWith(ArchiveConstants.SETTINGS_PATH))
136 { 136 {
137 LoadRegionSettings(filePath, data); 137 LoadRegionSettings(filePath, data);
138 } else if (filePath == ArchiveConstants.CONTROL_FILE_PATH) { 138 }
139 LoadArchiveMetadata(filePath, data); 139 else if (filePath == ArchiveConstants.CONTROL_FILE_PATH)
140 {
141 LoadControlFile(filePath, data);
140 } 142 }
141 } 143 }
142 144
@@ -483,14 +485,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
483 } 485 }
484 486
485 /// <summary> 487 /// <summary>
486 /// Load oar file metadata 488 /// Load oar control file
487 /// </summary> 489 /// </summary>
488 /// <param name="terrainPath"></param> 490 /// <param name="path"></param>
489 /// <param name="data"></param> 491 /// <param name="data"></param>
490 /// <returns> 492 private void LoadControlFile(string path, byte[] data)
491 /// true if terrain was resolved successfully, false otherwise.
492 /// </returns>
493 private bool LoadArchiveMetadata(string terrainPath, byte[] data)
494 { 493 {
495 //Create the XmlNamespaceManager. 494 //Create the XmlNamespaceManager.
496 NameTable nt = new NameTable(); 495 NameTable nt = new NameTable();
@@ -499,9 +498,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
499 // Create the XmlParserContext. 498 // Create the XmlParserContext.
500 XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); 499 XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None);
501 500
502 XmlTextReader xtr = new XmlTextReader(m_asciiEncoding.GetString(data), 501 XmlTextReader xtr
503 XmlNodeType.Document, context); 502 = new XmlTextReader(m_asciiEncoding.GetString(data), XmlNodeType.Document, context);
504
505 503
506 RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings; 504 RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings;
507 505
@@ -514,15 +512,15 @@ namespace OpenSim.Region.CoreModules.World.Archiver
514 { 512 {
515 if (xtr.NodeType == XmlNodeType.Element) 513 if (xtr.NodeType == XmlNodeType.Element)
516 { 514 {
517 if (xtr.Name.ToString()=="date") 515 if (xtr.Name.ToString() == "date")
518 { 516 {
519 currentRegionSettings.LoadedCreationDate = xtr.ReadElementContentAsString(); 517 currentRegionSettings.LoadedCreationDate = xtr.ReadElementContentAsString();
520 } 518 }
521 else if (xtr.Name.ToString()=="time") 519 else if (xtr.Name.ToString() == "time")
522 { 520 {
523 currentRegionSettings.LoadedCreationTime = xtr.ReadElementContentAsString(); 521 currentRegionSettings.LoadedCreationTime = xtr.ReadElementContentAsString();
524 } 522 }
525 else if (xtr.Name.ToString()=="id") 523 else if (xtr.Name.ToString() == "id")
526 { 524 {
527 currentRegionSettings.LoadedCreationID = xtr.ReadElementContentAsString(); 525 currentRegionSettings.LoadedCreationID = xtr.ReadElementContentAsString();
528 } 526 }
@@ -533,8 +531,5 @@ namespace OpenSim.Region.CoreModules.World.Archiver
533 531
534 return true; 532 return true;
535 } 533 }
536
537
538
539 } 534 }
540} 535}
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
index e9b24f4..ccbf570 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
93 93
94 // Write out control file 94 // Write out control file
95 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile()); 95 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
96
97 m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); 96 m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
98 97
99 // Write out region settings 98 // Write out region settings