Update POSIXFileio.cpp

This commit is contained in:
marauder2k7 2023-07-27 21:48:13 +01:00
parent f86f947f70
commit 4ae888e4f8

View file

@ -1016,19 +1016,16 @@ bool Platform::isFile(const char *pFilePath)
// Get file info
struct stat fStat;
if (stat(pFilePath, &fStat) == 0)
if (stat(pathName, &fStat) == 0)
return true;
if ((fStat.st_mode & S_IFMT) == S_IFREG)
return true;
// Since stat failed see if it exists in a zip file loaded
if (Torque::FS::IsFile(pFilePath))
if (Torque::FS::IsFile(pathName))
return true;
// if the file is a "regular file" then true
// must be some other file (directory, device, etc.)
return false;
}