From 7a970e1d00f24d802c128b17d3dd36a55d1d7fda Mon Sep 17 00:00:00 2001 From: Ziemas Date: Wed, 9 Mar 2022 02:02:44 +0100 Subject: [PATCH] Filesystem: Properly convert stat return to bool. Two of the overloads where wrong. --- common/FileSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index 6ff7a9b31c..ef45a74014 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -1269,7 +1269,7 @@ bool FileSystem::FindFiles(const char* Path, const char* Pattern, u32 Flags, Fin bool FileSystem::StatFile(const char* path, struct stat* st) { - return stat(path, st); + return stat(path, st) == 0; } bool FileSystem::StatFile(std::FILE* fp, struct stat* st) @@ -1278,7 +1278,7 @@ bool FileSystem::StatFile(std::FILE* fp, struct stat* st) if (fd < 0) return false; - return fstat(fd, st); + return fstat(fd, st) == 0; } bool FileSystem::StatFile(const char* path, FILESYSTEM_STAT_DATA* sd)