From 1842471eb1b8a9990b8bb60f106474e2003b6ec6 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 28 Oct 2017 16:00:51 -0400 Subject: [PATCH] use filestream_open to check if a file exists --- libretro-common/file/file_path.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index 97945e9ebc..b078a6b04d 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -30,6 +30,7 @@ #include #include +#include #ifndef __MACH__ #include @@ -401,17 +402,17 @@ bool path_is_compressed_file(const char* path) */ bool path_file_exists(const char *path) { - FILE *dummy; + RFILE *dummy; if (!path || !*path) return false; - dummy = fopen(path, "rb"); + dummy = filestream_open(path, RFILE_MODE_READ, -1); if (!dummy) return false; - fclose(dummy); + filestream_close(dummy); return true; }