From dc9044c6b77da2fab29710c60a08f5e9c0cc8e73 Mon Sep 17 00:00:00 2001 From: radius Date: Thu, 24 Sep 2015 21:05:23 -0500 Subject: [PATCH] [PSP] fix path_stat --- libretro-common/file/retro_stat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libretro-common/file/retro_stat.c b/libretro-common/file/retro_stat.c index 0e05a1ec51..d3fc24d731 100644 --- a/libretro-common/file/retro_stat.c +++ b/libretro-common/file/retro_stat.c @@ -83,8 +83,18 @@ static bool path_stat(const char *path, enum stat_mode mode) { #if defined(VITA) || defined(PSP) SceIoStat buf; + char *tmp = strdup(path); + size_t len = strlen(tmp); + if (tmp[len-1] == '/') + tmp[len-1]='\0'; + if (sceIoGetstat(path, &buf) < 0) + { + free(tmp); return false; + } + free(tmp); + #elif defined(__CELLOS_LV2__) CellFsStat buf; if (cellFsStat(path, &buf) < 0)