iOS/tvOS: Fix a couple more path name mangling bugs (#16465)

This commit is contained in:
Eric Warmenhoven 2024-04-24 13:18:47 -04:00 committed by GitHub
parent e2a1e6024a
commit d6ceb3d15c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View File

@ -429,7 +429,14 @@ static int general_push(menu_displaylist_info_t *info,
{
/* Need to use the scratch buffer here */
char tmp_str[PATH_MAX_LENGTH];
fill_pathname_join_special(tmp_str, menu->scratch2_buf,
#if IOS
char tmp_path[PATH_MAX_LENGTH];
fill_pathname_expand_special(tmp_path, menu->scratch2_buf, sizeof(tmp_path));
const char *menu_path = tmp_path;
#else
const char *menu_path = menu->scratch2_buf;
#endif
fill_pathname_join_special(tmp_str, menu_path,
menu->scratch_buf, sizeof(tmp_str));
if (!string_is_empty(info->path))

View File

@ -1970,6 +1970,12 @@ static int file_load_with_detect_core_wrapper(
menu_entries_get_last_stack(&menu_path, &menu_label, NULL, NULL, NULL);
#if IOS
char tmp_path[PATH_MAX_LENGTH];
fill_pathname_expand_special(tmp_path, menu_path, sizeof(tmp_path));
menu_path = tmp_path;
#endif
if (!string_is_empty(menu_path))
strlcpy(menu_path_new, menu_path, sizeof(menu_path_new));
@ -2151,6 +2157,12 @@ static int generic_action_ok(const char *path,
menu_entries_get_last_stack(&menu_path,
&menu_label, NULL, &enum_idx, NULL);
#if IOS
char tmp_path[PATH_MAX_LENGTH];
fill_pathname_expand_special(tmp_path, menu_path, sizeof(tmp_path));
menu_path = tmp_path;
#endif
if (!string_is_empty(path))
fill_pathname_join_special(action_path,
menu_path, path, sizeof(action_path));
@ -7553,6 +7565,12 @@ static int action_ok_load_archive_detect_core(const char *path,
menu_path = menu->scratch2_buf;
content_path = menu->scratch_buf;
#if IOS
char tmp_path[PATH_MAX_LENGTH];
fill_pathname_expand_special(tmp_path, menu_path, sizeof(tmp_path));
menu_path = tmp_path;
#endif
core_info_get_list(&list);
def_info.data = list;