From 33e44b2059831594f91a84d07b316e8eee94bd4f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 10 Mar 2023 00:56:57 +0200 Subject: SL-19353 Mesh importer throws an error when the file extension is upper case --- indra/llprimitive/llgltfloader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive/llgltfloader.cpp') diff --git a/indra/llprimitive/llgltfloader.cpp b/indra/llprimitive/llgltfloader.cpp index fd304f7bc9..7394f99794 100644 --- a/indra/llprimitive/llgltfloader.cpp +++ b/indra/llprimitive/llgltfloader.cpp @@ -106,10 +106,12 @@ bool LLGLTFLoader::OpenFile(const std::string &filename) tinygltf::TinyGLTF loader; std::string error_msg; std::string warn_msg; + std::string filename_lc(filename); + LLStringUtil::toLower(filename_lc); // Load a tinygltf model fom a file. Assumes that the input filename has already been // been sanitized to one of (.gltf , .glb) extensions, so does a simple find to distinguish. - if (std::string::npos == filename.rfind(".gltf")) + if (std::string::npos == filename_lc.rfind(".gltf")) { // file is binary mGltfLoaded = loader.LoadBinaryFromFile(&mGltfModel, &error_msg, &warn_msg, filename); } -- cgit v1.2.3