mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-31 08:33:40 +00:00
(Core) Remove obsolete file checking function
This commit is contained in:
parent
b87e1c4f48
commit
317f255eae
21
file.c
21
file.c
@ -938,27 +938,6 @@ void dir_list_free(char **dir_list)
|
||||
free(orig);
|
||||
}
|
||||
|
||||
#ifdef SSNES_CONSOLE
|
||||
bool filepath_exists(const char *path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DWORD file_attr;
|
||||
|
||||
file_attr = GetFileAttributes(path);
|
||||
|
||||
if (0xFFFFFFFF == file_attr)
|
||||
return false;
|
||||
return true;
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
CellFsStat file_attr;
|
||||
if(cellFsStat(path,&file_attr) == CELL_FS_SUCCEEDED)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
bool path_is_directory(const char *path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
4
file.h
4
file.h
@ -47,10 +47,6 @@ void dir_list_free(char **dir_list);
|
||||
bool path_is_directory(const char *path);
|
||||
bool path_file_exists(const char *path);
|
||||
|
||||
#ifdef SSNES_CONSOLE
|
||||
bool filepath_exists(const char *path);
|
||||
#endif
|
||||
|
||||
// Path-name operations.
|
||||
// If any of these operation are detected to overflow, the application will be terminated.
|
||||
|
||||
|
@ -165,7 +165,7 @@ static void set_default_settings(void)
|
||||
|
||||
static void init_settings(void)
|
||||
{
|
||||
if(!filepath_exists(SYS_CONFIG_FILE))
|
||||
if(!path_file_exists(SYS_CONFIG_FILE))
|
||||
{
|
||||
SSNES_ERR("Config file \"%s\" doesn't exist. Creating...\n", SYS_CONFIG_FILE);
|
||||
FILE * f;
|
||||
@ -210,7 +210,7 @@ static void init_settings(void)
|
||||
|
||||
static void save_settings(void)
|
||||
{
|
||||
if(!filepath_exists(SYS_CONFIG_FILE))
|
||||
if(!path_file_exists(SYS_CONFIG_FILE))
|
||||
{
|
||||
FILE * f;
|
||||
f = fopen(SYS_CONFIG_FILE, "w");
|
||||
@ -427,7 +427,7 @@ begin_loop:
|
||||
goto begin_loop;
|
||||
|
||||
begin_shutdown:
|
||||
if(filepath_exists(SYS_CONFIG_FILE))
|
||||
if(path_file_exists(SYS_CONFIG_FILE))
|
||||
save_settings();
|
||||
ps3_input_deinit();
|
||||
ps3_video_deinit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user