Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS/tvOS: fix Import Content #16450

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions menu/cbs/menu_cbs_ok.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 12 additions & 0 deletions menu/cbs/menu_cbs_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down
Loading