aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs37
1 files changed, 1 insertions, 36 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
index eb9688d..d1fe1f5 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -108,12 +108,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
108// "[ARCHIVER]: Received {0} of {1} assets requested", 108// "[ARCHIVER]: Received {0} of {1} assets requested",
109// assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count); 109// assetsFoundUuids.Count, assetsFoundUuids.Count + assetsNotFoundUuids.Count);
110 110
111 m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time.");
112
113 // Write out control file
114 m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile());
115 m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
116
117 // Write out region settings 111 // Write out region settings
118 string settingsPath 112 string settingsPath
119 = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName); 113 = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_scene.RegionInfo.RegionName);
@@ -155,35 +149,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
155 m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); 149 m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive.");
156 } 150 }
157 151
158 /// <summary> 152
159 /// Create the control file for a 0.2 version archive
160 /// </summary>
161 /// <returns></returns>
162 public static string Create0p2ControlFile()
163 {
164 StringWriter sw = new StringWriter();
165 XmlTextWriter xtw = new XmlTextWriter(sw);
166 xtw.Formatting = Formatting.Indented;
167 xtw.WriteStartDocument();
168 xtw.WriteStartElement("archive");
169 xtw.WriteAttributeString("major_version", "0");
170 xtw.WriteAttributeString("minor_version", "3");
171
172 xtw.WriteStartElement("creation_info");
173 DateTime now = DateTime.UtcNow;
174 TimeSpan t = now - new DateTime(1970, 1, 1);
175 xtw.WriteElementString("datetime", ((int)t.TotalSeconds).ToString());
176 xtw.WriteElementString("id", UUID.Random().ToString());
177 xtw.WriteEndElement();
178 xtw.WriteEndElement();
179
180 xtw.Flush();
181 xtw.Close();
182
183 String s = sw.ToString();
184 sw.Close();
185
186 return s;
187 }
188 } 153 }
189} 154}