From 7352bd7b992c36026876b4d1fb3e63f02aa984ec Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 5 Jun 2008 00:01:38 +0000 Subject: * Change archiver 'textures' dir back to 'assets' --- .../Region/Environment/Modules/World/Archiver/ArchiveConstants.cs | 2 +- .../Environment/Modules/World/Archiver/ArchiveReadRequest.cs | 2 +- .../Region/Environment/Modules/World/Archiver/AssetsArchiver.cs | 8 ++++---- .../Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs index 517a79e..872eb77 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// /// Path for the assets held in an archive /// - public static readonly string TEXTURES_PATH = "textures/"; + public static readonly string ASSETS_PATH = "textures/"; /// /// Extension used for texture assets in archive diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index f92e955..6e53f28 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs @@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver string xml = m_asciiEncoding.GetString(data); dearchiver.AddAssetMetadata(xml); } - else if (filePath.StartsWith(ArchiveConstants.TEXTURES_PATH)) + else if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) { dearchiver.AddAssetData(filePath, data); } diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs index 12e1f81..ed5f0e7 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs @@ -58,9 +58,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// public void Archive(TarArchiveWriter archive) { - // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar - //archive.AddDir("assets"); - WriteMetadata(archive); WriteData(archive); } @@ -111,12 +108,15 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver /// protected void WriteData(TarArchiveWriter archive) { + // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar + //archive.AddDir("assets"); + foreach (LLUUID uuid in m_assets.Keys) { if (m_assets[uuid] != null) { archive.AddFile( - ArchiveConstants.TEXTURES_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION, + ArchiveConstants.ASSETS_PATH + uuid.ToString() + ArchiveConstants.TEXTURE_EXTENSION, m_assets[uuid].Data); } else diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs index 1c5b535..9e63ccf 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs @@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver protected void ResolveAssetData(string assetPath, byte[] data) { // Right now we're nastily obtaining the lluuid from the filename - string filename = assetPath.Remove(0, ArchiveConstants.TEXTURES_PATH.Length); + string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); if (m_metadata.ContainsKey(filename)) { -- cgit v1.1