1
0
mirror of https://github.com/libretro/RetroArch synced 2025-04-02 07:20:34 +00:00

use filestream_open to check if a file exists

This commit is contained in:
Brad Parker 2017-10-28 16:00:51 -04:00
parent a75014c705
commit 1842471eb1

@ -30,6 +30,7 @@
#include <boolean.h> #include <boolean.h>
#include <file/file_path.h> #include <file/file_path.h>
#include <streams/file_stream.h>
#ifndef __MACH__ #ifndef __MACH__
#include <compat/strl.h> #include <compat/strl.h>
@ -401,17 +402,17 @@ bool path_is_compressed_file(const char* path)
*/ */
bool path_file_exists(const char *path) bool path_file_exists(const char *path)
{ {
FILE *dummy; RFILE *dummy;
if (!path || !*path) if (!path || !*path)
return false; return false;
dummy = fopen(path, "rb"); dummy = filestream_open(path, RFILE_MODE_READ, -1);
if (!dummy) if (!dummy)
return false; return false;
fclose(dummy); filestream_close(dummy);
return true; return true;
} }