write IAR control file first in the archive rather than last

viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-10-22 18:39:40 +01:00
parent e7f184345e
commit bb28726a8b
2 changed files with 8 additions and 5 deletions

View File

@ -123,9 +123,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
try try
{ {
// We're almost done. Just need to write out the control file now
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile());
m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");
m_archiveWriter.Close(); m_archiveWriter.Close();
} }
catch (Exception e) catch (Exception e)
@ -277,6 +274,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
m_archiveWriter = new TarArchiveWriter(m_saveStream); m_archiveWriter = new TarArchiveWriter(m_saveStream);
// Write out control file. This has to be done first so that subsequent loaders will see this file first
// XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile());
m_log.InfoFormat("[INVENTORY ARCHIVER]: Added control file to archive.");
if (inventoryFolder != null) if (inventoryFolder != null)
{ {
m_log.DebugFormat( m_log.DebugFormat(

View File

@ -171,7 +171,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time."); m_log.InfoFormat("[ARCHIVER]: Creating archive file. This may take some time.");
// Write out control file // Write out control file. This has to be done first so that subsequent loaders will see this file first
// XXX: I know this is a weak way of doing it since external non-OAR aware tar executables will not do this
archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile(options)); archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p2ControlFile(options));
m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); m_log.InfoFormat("[ARCHIVER]: Added control file to archive.");