From fdd5e7cea0bdb7d5cd51257645b74e9b4c1d0da2 Mon Sep 17 00:00:00 2001 From: greenchili2 <85094032+greenchili2@users.noreply.github.com> Date: Sat, 30 Sep 2023 13:38:32 -0400 Subject: [PATCH] Fix bug that was causing weirdness in Wii builds. (#15752) Things like the info files not being read. User defined directories not sticking ( likely not detected ) and all kinds of other goodness. --- libretro-common/vfs/vfs_implementation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro-common/vfs/vfs_implementation.c b/libretro-common/vfs/vfs_implementation.c index 24699ec1ac..3354f51bdd 100644 --- a/libretro-common/vfs/vfs_implementation.c +++ b/libretro-common/vfs/vfs_implementation.c @@ -923,11 +923,11 @@ int retro_vfs_stat_impl(const char *path, int32_t *size) if (path_buf[len - 1] == '/') path_buf[len - 1] = '\0'; - free(path_buf); - if (stat(path_buf, &stat_buf) < 0) return 0; + free(path_buf); + if (size) *size = (int32_t)stat_buf.st_size;