Add more accurate return value for DeleteFile when using Valve FS.
This commit is contained in:
parent
573aea20fb
commit
f2b19e6c87
@ -125,10 +125,22 @@ public:
|
|||||||
inline bool Remove(const char *pFilePath)
|
inline bool Remove(const char *pFilePath)
|
||||||
{
|
{
|
||||||
if (_fstype == FSType::VALVE)
|
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
|
else
|
||||||
|
{
|
||||||
return unlink(pFilePath) == 0;
|
return unlink(pFilePath) == 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
inline bool EndOfFile(void *pFile)
|
inline bool EndOfFile(void *pFile)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user