mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Adds a verifyCompatibility method to the Win32FileSystem to report case-sensitivity issues
-triggered during debug only -still need to expand that to handle bad directories.
This commit is contained in:
parent
680f4442f0
commit
a0aa826f16
2 changed files with 12 additions and 0 deletions
|
|
@ -236,6 +236,14 @@ Win32FileSystem::~Win32FileSystem()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Win32FileSystem::verifyCompatibility(const Path& _path, WIN32_FIND_DATAW _info)
|
||||||
|
{
|
||||||
|
if (_path.getFullFileName().isNotEmpty() && _path.getFullFileName().compare(String(_info.cFileName)) != 0)
|
||||||
|
{
|
||||||
|
Con::warnf("Linux Compatibility Warning: %s != %s", String(_info.cFileName).c_str(), _path.getFullFileName().c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FileNodeRef Win32FileSystem::resolve(const Path& path)
|
FileNodeRef Win32FileSystem::resolve(const Path& path)
|
||||||
{
|
{
|
||||||
String file = _BuildFileName(mVolume,path);
|
String file = _BuildFileName(mVolume,path);
|
||||||
|
|
@ -245,6 +253,9 @@ FileNodeRef Win32FileSystem::resolve(const Path& path)
|
||||||
::FindClose(handle);
|
::FindClose(handle);
|
||||||
if (handle != INVALID_HANDLE_VALUE)
|
if (handle != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
|
#ifdef TORQUE_DEBUG
|
||||||
|
verifyCompatibility(path, info);
|
||||||
|
#endif
|
||||||
if (S_ISREG(info.dwFileAttributes))
|
if (S_ISREG(info.dwFileAttributes))
|
||||||
return new Win32File(path,file);
|
return new Win32File(path,file);
|
||||||
if (S_ISDIR(info.dwFileAttributes))
|
if (S_ISDIR(info.dwFileAttributes))
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ public:
|
||||||
String getTypeStr() const { return "Win32"; }
|
String getTypeStr() const { return "Win32"; }
|
||||||
|
|
||||||
FileNodeRef resolve(const Path& path);
|
FileNodeRef resolve(const Path& path);
|
||||||
|
void verifyCompatibility(const Path& _path, WIN32_FIND_DATAW _info);
|
||||||
FileNodeRef create(const Path& path,FileNode::Mode);
|
FileNodeRef create(const Path& path,FileNode::Mode);
|
||||||
bool remove(const Path& path);
|
bool remove(const Path& path);
|
||||||
bool rename(const Path& from,const Path& to);
|
bool rename(const Path& from,const Path& to);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue