From c376bc3f9cf12b00aaf7aeb437e426b30ef00e6d Mon Sep 17 00:00:00 2001 From: Robert MacGregor Date: Mon, 11 Oct 2021 19:31:37 -0400 Subject: [PATCH] * [ZIP] BugFix: Correct another codepath that may fail due to case sensitive string searches. --- Engine/source/core/util/zip/zipVolume.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Engine/source/core/util/zip/zipVolume.cpp b/Engine/source/core/util/zip/zipVolume.cpp index a3a0ac7c9..d56c9471e 100644 --- a/Engine/source/core/util/zip/zipVolume.cpp +++ b/Engine/source/core/util/zip/zipVolume.cpp @@ -487,8 +487,15 @@ FileNodeRef ZipFileSystem::resolveLoose(const Path& path) if(mZipNameIsDir) { // Remove the fake root from the name so things can be found +#ifdef TORQUE_ZIP_PATH_CASE_INSENSITIVE + String lowerFakeRoot = String::ToLower(mFakeRoot); + String lowerName = String::ToLower(name); + if(lowerName.find(lowerFakeRoot) == 0) + name = name.substr(mFakeRoot.length()); +#else if(name.find(mFakeRoot) == 0) - name = name.substr(mFakeRoot.length()); + name = name.substr(mFakeRoot.length()); +#endif #ifdef TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP else