Add more accurate return value for DeleteFile when using Valve FS.

This commit is contained in:
Nicholas Hastings 2014-08-03 09:10:02 -04:00
parent 573aea20fb
commit f2b19e6c87

View File

@ -125,9 +125,21 @@ public:
inline bool Remove(const char *pFilePath)
{
if (_fstype == FSType::VALVE)
return smcore.filesystem->RemoveFile(pFilePath), true;
{
if (!smcore.filesystem->FileExists(pFilePath))
return false;
smcore.filesystem->RemoveFile(pFilePath);
if (smcore.filesystem->FileExists(pFilePath))
return false;
return true;
}
else
{
return unlink(pFilePath) == 0;
}
}
inline bool EndOfFile(void *pFile)