string_is_empty check is already being done by path_is_valid/file stat

path cb function
This commit is contained in:
twinaphex 2019-05-22 03:05:31 +02:00
parent 32f9b9ab9a
commit eed2ea7a99
3 changed files with 13 additions and 12 deletions

View File

@ -1529,7 +1529,7 @@ static bool command_event_save_core_config(void)
config_path[0] = '\0';
/* Infer file name based on libretro core. */
if (!string_is_empty(core_path) && filestream_exists(core_path))
if (path_is_valid(core_path))
{
unsigned i;
RARCH_LOG("%s\n", msg_hash_to_str(MSG_USING_CORE_NAME_FOR_NEW_CONFIG));

View File

@ -1185,8 +1185,7 @@ static void xmb_update_savestate_thumbnail_image(void *data)
if (!xmb)
return;
if (!string_is_empty(xmb->savestate_thumbnail_file_path)
&& filestream_exists(xmb->savestate_thumbnail_file_path))
if (path_is_valid(xmb->savestate_thumbnail_file_path))
task_push_image_load(xmb->savestate_thumbnail_file_path,
menu_display_handle_savestate_thumbnail_upload, NULL);
else

View File

@ -1683,10 +1683,12 @@ bool menu_display_reset_textures_list(
ti.pixels = NULL;
ti.supports_rgba = video_driver_supports_rgba();
if (!string_is_empty(texture_path))
if (string_is_empty(texture_path))
return false;
fill_pathname_join(texpath, iconpath, texture_path, sizeof(texpath));
if (string_is_empty(texpath) || !filestream_exists(texpath))
if (!path_is_valid(texpath))
return false;
if (!image_texture_load(&ti, texpath))