From 4c27cd6b5cabbe985210556c4bdcc8d84b20d8b4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 1 Oct 2015 07:24:12 +0200 Subject: [PATCH] Attempt to fix Win32 port - path_stat/path_get_size --- libretro-common/file/retro_stat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libretro-common/file/retro_stat.c b/libretro-common/file/retro_stat.c index 261507d7a6..d3a2664148 100644 --- a/libretro-common/file/retro_stat.c +++ b/libretro-common/file/retro_stat.c @@ -100,9 +100,12 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) if (cellFsStat(path, &buf) < 0) return false; #elif defined(_WIN32) + struct stat buf; DWORD ret = GetFileAttributes(path); if (ret == INVALID_FILE_ATTRIBUTES) return false; + if (stat(path, &buf) < 0) + return false; #else struct stat buf; if (stat(path, &buf) < 0)