aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index 87106fb..201986e 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -211,7 +211,18 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
211 { 211 {
212 // Right now we're nastily obtaining the lluuid from the filename 212 // Right now we're nastily obtaining the lluuid from the filename
213 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); 213 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
214 string extension = filename.Substring(filename.LastIndexOf("_")); 214 int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
215
216 if (i == -1)
217 {
218 m_log.ErrorFormat(
219 "[ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping",
220 assetPath, ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
221
222 return false;
223 }
224
225 string extension = filename.Substring(i);
215 string uuid = filename.Remove(filename.Length - extension.Length); 226 string uuid = filename.Remove(filename.Length - extension.Length);
216 227
217 if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension)) 228 if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension))