aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2009-09-25 14:52:53 +0100
committerJustin Clark-Casey (justincc)2009-09-25 14:52:53 +0100
commit613cb417c01fbca0cc28c3ef0313bf46e8d7c586 (patch)
tree38b8b9dfc139875c7b48f84281c732d112d14853 /OpenSim
parentminor: remove some mono compiler warnings (diff)
downloadopensim-SC_OLD-613cb417c01fbca0cc28c3ef0313bf46e8d7c586.zip
opensim-SC_OLD-613cb417c01fbca0cc28c3ef0313bf46e8d7c586.tar.gz
opensim-SC_OLD-613cb417c01fbca0cc28c3ef0313bf46e8d7c586.tar.bz2
opensim-SC_OLD-613cb417c01fbca0cc28c3ef0313bf46e8d7c586.tar.xz
add control files containing version info to iars
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 7b4a9eb..fd42586 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -118,6 +118,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
118 118
119 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) 119 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids)
120 { 120 {
121 // We're almost done. Just need to write out the control file now
122 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile());
123 m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
124
121 Exception reportedException = null; 125 Exception reportedException = null;
122 bool succeeded = true; 126 bool succeeded = true;
123 127
@@ -409,5 +413,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
409 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, 413 ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR,
410 id); 414 id);
411 } 415 }
416
417 /// <summary>
418 /// Create the control file for a 0.1 version archive
419 /// </summary>
420 /// <returns></returns>
421 public static string Create0p1ControlFile()
422 {
423 StringWriter sw = new StringWriter();
424 XmlTextWriter xtw = new XmlTextWriter(sw);
425 xtw.Formatting = Formatting.Indented;
426 xtw.WriteStartDocument();
427 xtw.WriteStartElement("archive");
428 xtw.WriteAttributeString("major_version", "0");
429 xtw.WriteAttributeString("minor_version", "1");
430 xtw.WriteEndElement();
431
432 xtw.Flush();
433 xtw.Close();
434
435 String s = sw.ToString();
436 sw.Close();
437
438 return s;
439 }
412 } 440 }
413} \ No newline at end of file 441} \ No newline at end of file