From fa5f27acfa753d5f9e15b222bb826ea4a5f313b6 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 26 Jun 2008 17:36:54 +0000 Subject: * Put extensions on all assets in an archive * Choice of extensions is a scratch set, may not yet be correct * This facility is not useable yet - not least because I've just come across a significant save bug I need to investigate --- .../Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs index 527d544..284a39e 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs @@ -148,11 +148,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver { AssetMetadata metadata = m_metadata[filename]; - string extension = String.Empty; - - if ((sbyte)AssetType.Texture == metadata.AssetType) + if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(metadata.AssetType)) { - filename = filename.Remove(filename.Length - ArchiveConstants.TEXTURE_EXTENSION.Length); + string extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[metadata.AssetType]; + filename = filename.Remove(filename.Length - extension.Length); } m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); -- cgit v1.1