From 61a630fabed41a288d9c0e95520ef70810937231 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 3 Oct 2015 01:01:57 +0200 Subject: [PATCH] GetFileAttributesEx returns 'zero' in case of an error --- libretro-common/file/retro_stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/file/retro_stat.c b/libretro-common/file/retro_stat.c index 164d0bb86a..c35b83a472 100644 --- a/libretro-common/file/retro_stat.c +++ b/libretro-common/file/retro_stat.c @@ -102,7 +102,7 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) #elif defined(_WIN32) WIN32_FILE_ATTRIBUTE_DATA file_info; DWORD ret = GetFileAttributesEx(path, GetFileExInfoStandard, &file_info); - if (ret == INVALID_FILE_ATTRIBUTES) + if (ret == 0) return false; #else struct stat buf;