Remove config_file_exists, replace with path_is_valid
This commit is contained in:
LibretroAdmin 2022-09-03 06:35:41 +02:00
parent 8b5c5358ad
commit 3abd414656
3 changed files with 3 additions and 16 deletions

View File

@ -3896,7 +3896,7 @@ bool config_load_override(void *data)
/* per-core overrides */
/* Create a new config file from core_path */
if (config_file_exists(core_path))
if (path_is_valid(core_path))
{
RARCH_LOG("[Overrides]: Core-specific overrides found at \"%s\".\n",
core_path);
@ -3910,7 +3910,7 @@ bool config_load_override(void *data)
{
/* per-content-dir overrides */
/* Create a new config file from content_path */
if (config_file_exists(content_path))
if (path_is_valid(content_path))
{
char tmp_path[PATH_MAX_LENGTH + 1];
@ -3937,7 +3937,7 @@ bool config_load_override(void *data)
/* per-game overrides */
/* Create a new config file from game_path */
if (config_file_exists(game_path))
if (path_is_valid(game_path))
{
char tmp_path[PATH_MAX_LENGTH + 1];

View File

@ -1513,14 +1513,3 @@ bool config_get_entry_list_next(struct config_file_entry *entry)
entry->next = next->next;
return true;
}
bool config_file_exists(const char *path)
{
config_file_t conf;
config_file_initialize(&conf);
if (config_file_load_internal(&conf, path, 0, NULL) == 1)
return false;
config_file_deinitialize(&conf);
return true;
}

View File

@ -325,8 +325,6 @@ bool config_file_write(config_file_t *conf, const char *path, bool val);
**/
void config_file_dump(config_file_t *conf, FILE *file, bool val);
bool config_file_exists(const char *path);
RETRO_END_DECLS
#endif