From b15bcff0abcd5f0eab0dcc9912aaac936d56a4d0 Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Mon, 18 Jun 2018 19:31:29 +0200 Subject: [PATCH] Fix `Utils::getCaseSensitivePath` globally --- src/logic/DialogManager.cpp | 2 +- src/utils/Utils.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/logic/DialogManager.cpp b/src/logic/DialogManager.cpp index f430cebb..1b6bb71a 100644 --- a/src/logic/DialogManager.cpp +++ b/src/logic/DialogManager.cpp @@ -355,7 +355,7 @@ bool DialogManager::init() for (const auto& outFile : {OU_FILE, OU_FILE_2}) { ou = Utils::getCaseSensitivePath(outFile, m_World.getEngine()->getEngineArgs().gameBaseDirectory); - if (!ou.empty() && Utils::fileExists(ou)) + if (!ou.empty()) break; } diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 5d84bbd9..35b3dd10 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -116,10 +116,6 @@ size_t Utils::getFileSize(const std::string& file) std::string Utils::getCaseSensitivePath(const std::string& caseInsensitivePath, const std::string& prePath) { -#if defined(WIN32) || defined(_WIN32) || defined(EMSCRIPTEN) - return prePath + caseInsensitivePath; -#else - // Transform input path to lower std::string pathLower = caseInsensitivePath; std::transform(pathLower.begin(), pathLower.end(), pathLower.begin(), ::tolower); @@ -189,7 +185,6 @@ std::string Utils::getCaseSensitivePath(const std::string& caseInsensitivePath, } return result; -#endif } const bgfx::Memory* Utils::loadFileToMemory(const char* _filePath)