* Include prims.xml file in archive
parent
e116c94482
commit
fdf4de419f
|
@ -51,7 +51,9 @@ namespace OpenSim.Region.Environment
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Scene m_scene;
|
||||
private string m_savePath;
|
||||
private string m_savePath;
|
||||
|
||||
private string m_serializedEntities;
|
||||
|
||||
public ArchiveRequest(Scene scene, string savePath)
|
||||
{
|
||||
|
@ -83,9 +85,9 @@ namespace OpenSim.Region.Environment
|
|||
}
|
||||
}
|
||||
|
||||
string serEntities = SerializeObjects(entities);
|
||||
m_serializedEntities = SerializeObjects(entities);
|
||||
|
||||
if (serEntities != null && serEntities.Length > 0)
|
||||
if (m_serializedEntities != null && m_serializedEntities.Length > 0)
|
||||
{
|
||||
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
|
||||
m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} textures", textureUuids.Count);
|
||||
|
@ -103,6 +105,8 @@ namespace OpenSim.Region.Environment
|
|||
|
||||
TarArchive archive = new TarArchive();
|
||||
|
||||
archive.AddFile("prims.xml", m_serializedEntities);
|
||||
|
||||
foreach (LLUUID uuid in assets.Keys)
|
||||
{
|
||||
archive.AddFile(uuid.ToString() + ".jp2", assets[uuid].Data);
|
||||
|
|
|
@ -46,6 +46,16 @@ namespace OpenSim.Region.Environment
|
|||
|
||||
protected static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding();
|
||||
|
||||
/// <summary>
|
||||
/// Add a file to the tar archive
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <param name="data"></param>
|
||||
public void AddFile(string filePath, string data)
|
||||
{
|
||||
AddFile(filePath, m_asciiEncoding.GetBytes(data));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a file to the tar archive
|
||||
/// </summary>
|
||||
|
@ -164,8 +174,6 @@ namespace OpenSim.Region.Environment
|
|||
oString = "0" + oString;
|
||||
}
|
||||
|
||||
m_log.DebugFormat("[TAR ARCHIVE]: oString is {0}", oString);
|
||||
|
||||
byte[] oBytes = m_asciiEncoding.GetBytes(oString);
|
||||
|
||||
return oBytes;
|
||||
|
|
Loading…
Reference in New Issue