iOS/tvOS: fix Import Content (#16450)

pull/16453/head
Eric Warmenhoven 2024-04-19 10:12:13 -04:00 committed by GitHub
parent ca904a3f5d
commit 867d3a92af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 4 deletions

View File

@ -4008,10 +4008,10 @@ static int action_ok_path_manual_scan_directory(const char *path,
* can start with /private and this ensures the path starts with it.
* This will allow the path to be properly substituted when
* fill_pathname_expand_special() is called. */
char real_content_dir[PATH_MAX_LENGTH];
real_content_dir[0] = '\0';
realpath(content_dir, real_content_dir);
strlcpy(content_dir, real_content_dir, sizeof(content_dir));
char tmp_dir[PATH_MAX_LENGTH];
tmp_dir[0] = '\0';
fill_pathname_expand_special(tmp_dir, content_dir, sizeof(content_dir));
realpath(tmp_dir, content_dir);
}
#endif

View File

@ -57,6 +57,12 @@ int action_scan_file(const char *path,
menu_entries_get_last_stack(&menu_path, NULL, NULL, NULL, NULL);
#if IOS
char dir_path[PATH_MAX_LENGTH];
fill_pathname_expand_special(dir_path, menu_path, sizeof(dir_path));
menu_path = dir_path;
#endif
fill_pathname_join_special(fullpath, menu_path, path, sizeof(fullpath));
task_push_dbscan(
@ -81,6 +87,12 @@ int action_scan_directory(const char *path,
menu_entries_get_last_stack(&menu_path, NULL, NULL, NULL, NULL);
#if IOS
char dir_path[PATH_MAX_LENGTH];
fill_pathname_expand_special(dir_path, menu_path, sizeof(dir_path));
menu_path = dir_path;
#endif
if (path)
fill_pathname_join_special(fullpath, menu_path, path, sizeof(fullpath));
else