From 413e5422f2de60ea04afb151cf31b01496b799c2 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 22 Oct 2016 16:52:20 +0200 Subject: [PATCH] Fixed: Ignore extension when looking for textures --- code/nel/tools/3d/build_interface/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/nel/tools/3d/build_interface/main.cpp b/code/nel/tools/3d/build_interface/main.cpp index 4ed3b46a6..d37ba330e 100644 --- a/code/nel/tools/3d/build_interface/main.cpp +++ b/code/nel/tools/3d/build_interface/main.cpp @@ -531,17 +531,27 @@ int main(int argc, char **argv) continue; } + sTGAname = toLower(string(tgaName)); + + // search position of extension + std::string tgaExt = CFile::getExtension(sTGAname); + + // remove extension + sTGAname = CFile::getFilenameWithoutExtension(sTGAname); + sint i; - sTGAname = toLower(string(tgaName)); string findTGAName; for (i = 0; i < mapSize; ++i) { // get the string whitout path - findTGAName = toLower(CFile::getFilename(AllMapNames[i])); + findTGAName = toLower(CFile::getFilenameWithoutExtension(AllMapNames[i])); if( findTGAName == sTGAname ) break; } + + // append extension + sTGAname += "." + tgaExt; if( i == mapSize ) {