Add more accurate return value for DeleteFile when using Valve FS.
This commit is contained in:
parent
573aea20fb
commit
f2b19e6c87
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user