mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 02:38:11 +00:00
use filestream_open to check if a file exists
This commit is contained in:
parent
a75014c705
commit
1842471eb1
@ -30,6 +30,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
#include <file/file_path.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#ifndef __MACH__
|
||||
#include <compat/strl.h>
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user