aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs12
2 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs
index 34610e0..8a3fdb6 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveRequest.cs
@@ -51,7 +51,9 @@ namespace OpenSim.Region.Environment
51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
52 52
53 private Scene m_scene; 53 private Scene m_scene;
54 private string m_savePath; 54 private string m_savePath;
55
56 private string m_serializedEntities;
55 57
56 public ArchiveRequest(Scene scene, string savePath) 58 public ArchiveRequest(Scene scene, string savePath)
57 { 59 {
@@ -83,9 +85,9 @@ namespace OpenSim.Region.Environment
83 } 85 }
84 } 86 }
85 87
86 string serEntities = SerializeObjects(entities); 88 m_serializedEntities = SerializeObjects(entities);
87 89
88 if (serEntities != null && serEntities.Length > 0) 90 if (m_serializedEntities != null && m_serializedEntities.Length > 0)
89 { 91 {
90 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count); 92 m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
91 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count); 93 m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count);
@@ -103,6 +105,8 @@ namespace OpenSim.Region.Environment
103 105
104 TarArchive archive = new TarArchive(); 106 TarArchive archive = new TarArchive();
105 107
108 archive.AddFile("prims.xml", m_serializedEntities);
109
106 foreach (LLUUID uuid in assets.Keys) 110 foreach (LLUUID uuid in assets.Keys)
107 { 111 {
108 archive.AddFile(uuid.ToString() + ".jp2", assets[uuid].Data); 112 archive.AddFile(uuid.ToString() + ".jp2", assets[uuid].Data);
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs b/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs
index 0a6b1c1..5e5be34 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/TarArchive.cs
@@ -51,6 +51,16 @@ namespace OpenSim.Region.Environment
51 /// </summary> 51 /// </summary>
52 /// <param name="filePath"></param> 52 /// <param name="filePath"></param>
53 /// <param name="data"></param> 53 /// <param name="data"></param>
54 public void AddFile(string filePath, string data)
55 {
56 AddFile(filePath, m_asciiEncoding.GetBytes(data));
57 }
58
59 /// <summary>
60 /// Add a file to the tar archive
61 /// </summary>
62 /// <param name="filePath"></param>
63 /// <param name="data"></param>
54 public void AddFile(string filePath, byte[] data) 64 public void AddFile(string filePath, byte[] data)
55 { 65 {
56 m_files[filePath] = data; 66 m_files[filePath] = data;
@@ -164,8 +174,6 @@ namespace OpenSim.Region.Environment
164 oString = "0" + oString; 174 oString = "0" + oString;
165 } 175 }
166 176
167 m_log.DebugFormat("[TAR ARCHIVE]: oString is {0}", oString);
168
169 byte[] oBytes = m_asciiEncoding.GetBytes(oString); 177 byte[] oBytes = m_asciiEncoding.GetBytes(oString);
170 178
171 return oBytes; 179 return oBytes;