cosmetics

This commit is contained in:
UbitUmarov
2023-01-13 14:04:44 +00:00
parent c62e756160
commit 4503f4075c
2 changed files with 12 additions and 12 deletions

View File

@@ -306,7 +306,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
string filename = assetPath[ArchiveConstants.ASSETS_PATH.Length..];
int indx = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
if (indx < 0)
if (indx < 32)
{
m_log.ErrorFormat(
"[ARCHIVER]: Could not find extension information in asset path {0} since it's missing the separator {1}. Skipping",
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
continue;
}
string extension = filename[indx..];
if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.ContainsKey(extension))
if (ArchiveConstants.EXTENSION_TO_ASSET_TYPE.TryGetValue(extension, out sbyte ext))
{
string id = filename.Remove(indx);
if (UUID.TryParse(id, out UUID uuid))
@@ -323,7 +323,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
ids.Add(id);
uuids.Add(uuid);
datas.Add(data);
types.Add(ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]);
types.Add(ext);
continue;
}
}