mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 08:03:45 +00:00
* [ZIPVolume] BugFix: Add the capability of resolving ZIP prefix paths with case insensitivity and a CMake option to control this behavior.
This commit is contained in:
parent
f3eadb922b
commit
8d0128698a
3 changed files with 14 additions and 1 deletions
|
|
@ -407,8 +407,15 @@ FileNodeRef ZipFileSystem::resolve(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
|
||||
|
|
|
|||
|
|
@ -166,6 +166,9 @@ mark_as_advanced(TORQUE_MULTITHREAD)
|
|||
option(TORQUE_POSIX_PATH_CASE_INSENSITIVE ON)
|
||||
mark_as_advanced(TORQUE_POSIX_PATH_CASE_INSENSITIVE)
|
||||
|
||||
option(TORQUE_ZIP_PATH_CASE_INSENSITIVE ON)
|
||||
mark_as_advanced(TORQUE_ZIP_PATH_CASE_INSENSITIVE)
|
||||
|
||||
option(TORQUE_DISABLE_MEMORY_MANAGER "Disable memory manager" ON)
|
||||
mark_as_advanced(TORQUE_DISABLE_MEMORY_MANAGER)
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@
|
|||
/// Define me if you want path case insensitivity support on POSIX systems. Does nothing on Windows.
|
||||
#cmakedefine TORQUE_POSIX_PATH_CASE_INSENSITIVE
|
||||
|
||||
/// Define me if you want path case insensitivity support in ZIP files.
|
||||
#cmakedefine TORQUE_ZIP_PATH_CASE_INSENSITIVE
|
||||
|
||||
/// Define me if you want to enable multithreading support.
|
||||
#cmakedefine TORQUE_MULTITHREAD
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue