Skip to content

Commit

Permalink
Fix Utils::getCaseSensitivePath globally
Browse files Browse the repository at this point in the history
  • Loading branch information
frabert committed Jun 18, 2018
1 parent 8271199 commit b15bcff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/logic/DialogManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
5 changes: 0 additions & 5 deletions src/utils/Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -189,7 +185,6 @@ std::string Utils::getCaseSensitivePath(const std::string& caseInsensitivePath,
}

return result;
#endif
}

const bgfx::Memory* Utils::loadFileToMemory(const char* _filePath)
Expand Down

0 comments on commit b15bcff

Please sign in to comment.