mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
* [Unix] BugFix: Correct a fatal error that may be thrown from functions like isFile is passed a bad path.
This commit is contained in:
parent
98657bde7a
commit
42b862a54b
2 changed files with 14 additions and 8 deletions
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
|
||||
//#define DEBUG_SPEW
|
||||
extern void ResolvePathCaseInsensitive(char* pathName, S32 pathNameSize);
|
||||
extern bool ResolvePathCaseInsensitive(char* pathName, S32 pathNameSize, bool requiredAbsolute);
|
||||
|
||||
namespace Torque
|
||||
{
|
||||
|
|
@ -160,8 +160,7 @@ FileNodeRef PosixFileSystem::resolve(const Path& path)
|
|||
UTF8* caseSensitivePath = new UTF8[fileLength + 1];
|
||||
dMemcpy(caseSensitivePath, file.c_str(), fileLength);
|
||||
caseSensitivePath[fileLength] = 0x00;
|
||||
ResolvePathCaseInsensitive(caseSensitivePath, fileLength);
|
||||
|
||||
ResolvePathCaseInsensitive(caseSensitivePath, fileLength, false);
|
||||
String caseSensitiveFile(caseSensitivePath);
|
||||
#else
|
||||
String caseSensitiveFile = file;
|
||||
|
|
@ -181,6 +180,7 @@ FileNodeRef PosixFileSystem::resolve(const Path& path)
|
|||
#ifdef TORQUE_POSIX_PATH_CASE_INSENSITIVE
|
||||
delete[] caseSensitivePath;
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue