From 56309b1f19ba65957c7986683c3bf346a2af82cc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 3 Oct 2015 01:46:16 +0200 Subject: [PATCH] (retro_stat.c) Should hopefully fix this now --- libretro-common/file/retro_stat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libretro-common/file/retro_stat.c b/libretro-common/file/retro_stat.c index c35b83a472..76ec16cdc3 100644 --- a/libretro-common/file/retro_stat.c +++ b/libretro-common/file/retro_stat.c @@ -101,7 +101,8 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) return false; #elif defined(_WIN32) WIN32_FILE_ATTRIBUTE_DATA file_info; - DWORD ret = GetFileAttributesEx(path, GetFileExInfoStandard, &file_info); + GET_FILEEX_INFO_LEVELS fInfoLevelId = GetFileExInfoStandard; + DWORD ret = GetFileAttributesEx(path, fInfoLevelId, &file_info); if (ret == 0) return false; #else @@ -126,7 +127,7 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size) #elif defined(__CELLOS_LV2__) return ((buf.st_mode & S_IFMT) == S_IFDIR); #elif defined(_WIN32) - return (ret & FILE_ATTRIBUTE_DIRECTORY); + return (file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); #else return S_ISDIR(buf.st_mode); #endif