Fix unlink usag on Unix systems to properly use returned value

#2078
This commit is contained in:
Wojtek Figat
2023-12-27 21:11:01 +01:00
parent 78c27a8046
commit b4c23c969a
3 changed files with 3 additions and 3 deletions

View File

@@ -244,7 +244,7 @@ bool AndroidFileSystem::FileExists(const StringView& path)
bool AndroidFileSystem::DeleteFile(const StringView& path)
{
const StringAsANSI<> pathANSI(*path, path.Length());
return unlink(pathANSI.Get()) == 0;
return unlink(pathANSI.Get()) != 0;
}
uint64 AndroidFileSystem::GetFileSize(const StringView& path)

View File

@@ -218,7 +218,7 @@ bool AppleFileSystem::FileExists(const StringView& path)
bool AppleFileSystem::DeleteFile(const StringView& path)
{
const StringAsANSI<> pathANSI(*path, path.Length());
return unlink(pathANSI.Get()) == 0;
return unlink(pathANSI.Get()) != 0;
}
uint64 AppleFileSystem::GetFileSize(const StringView& path)

View File

@@ -364,7 +364,7 @@ bool LinuxFileSystem::FileExists(const StringView& path)
bool LinuxFileSystem::DeleteFile(const StringView& path)
{
const StringAsANSI<> pathANSI(*path, path.Length());
return unlink(pathANSI.Get()) == 0;
return unlink(pathANSI.Get()) != 0;
}
uint64 LinuxFileSystem::GetFileSize(const StringView& path)