From 657c37e71816634d675e30d1910ca1336eea0774 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 19 Jun 2020 19:09:00 +0300 Subject: SL-13487 File extension checks should ignore case --- indra/newview/llviewerassetupload.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerassetupload.cpp') diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index d53cc3f745..bc07821ccd 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -316,24 +316,25 @@ bool LLResourceUploadInfo::findAssetTypeOfExtension(const std::string& exten, LL bool LLResourceUploadInfo::findAssetTypeAndCodecOfExtension(const std::string& exten, LLAssetType::EType& asset_type, U32& codec, bool bulk_upload) { bool succ = false; - - codec = LLImageBase::getCodecFromExtension(exten); + std::string exten_lc(exten); + LLStringUtil::toLower(exten_lc); + codec = LLImageBase::getCodecFromExtension(exten_lc); if (codec != IMG_CODEC_INVALID) { asset_type = LLAssetType::AT_TEXTURE; succ = true; } - else if (exten == "wav") + else if (exten_lc == "wav") { asset_type = LLAssetType::AT_SOUND; succ = true; } - else if (exten == "anim") + else if (exten_lc == "anim") { asset_type = LLAssetType::AT_ANIMATION; succ = true; } - else if (!bulk_upload && (exten == "bvh")) + else if (!bulk_upload && (exten_lc == "bvh")) { asset_type = LLAssetType::AT_ANIMATION; succ = true; -- cgit v1.2.3