mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +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)
|
if(mZipNameIsDir)
|
||||||
{
|
{
|
||||||
// Remove the fake root from the name so things can be found
|
// 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)
|
if(name.find(mFakeRoot) == 0)
|
||||||
name = name.substr(mFakeRoot.length());
|
name = name.substr(mFakeRoot.length());
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
|
#ifdef TORQUE_DISABLE_FIND_ROOT_WITHIN_ZIP
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,9 @@ mark_as_advanced(TORQUE_MULTITHREAD)
|
||||||
option(TORQUE_POSIX_PATH_CASE_INSENSITIVE ON)
|
option(TORQUE_POSIX_PATH_CASE_INSENSITIVE ON)
|
||||||
mark_as_advanced(TORQUE_POSIX_PATH_CASE_INSENSITIVE)
|
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)
|
option(TORQUE_DISABLE_MEMORY_MANAGER "Disable memory manager" ON)
|
||||||
mark_as_advanced(TORQUE_DISABLE_MEMORY_MANAGER)
|
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.
|
/// Define me if you want path case insensitivity support on POSIX systems. Does nothing on Windows.
|
||||||
#cmakedefine TORQUE_POSIX_PATH_CASE_INSENSITIVE
|
#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.
|
/// Define me if you want to enable multithreading support.
|
||||||
#cmakedefine TORQUE_MULTITHREAD
|
#cmakedefine TORQUE_MULTITHREAD
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue