Be similarly careful in other functions

This commit is contained in:
twinaphex 2017-09-28 03:39:35 +02:00
parent 8b62a7cb7d
commit 8af2559b2a
1 changed files with 23 additions and 18 deletions

View File

@ -1384,6 +1384,7 @@ static int action_ok_file_load(const char *path,
menu_entries_get_last(menu_stack, &menu_path, &menu_label, NULL, NULL);
if (menu_label && !string_is_empty(menu_label))
setting = menu_setting_find(menu_label);
if (setting_get_type(setting) == ST_PATH)
@ -1392,6 +1393,8 @@ static int action_ok_file_load(const char *path,
if (menu_path && !string_is_empty(menu_path))
strlcpy(menu_path_new, menu_path, sizeof(menu_path_new));
if (menu_label && !string_is_empty(menu_label))
{
if (
string_is_equal(menu_label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE)) ||
@ -1407,6 +1410,7 @@ static int action_ok_file_load(const char *path,
menu->scratch2_buf, menu->scratch_buf,
sizeof(menu_path_new));
}
}
switch (type)
{
@ -2420,6 +2424,7 @@ static int action_ok_file_load_ffmpeg(const char *path,
content_info.args = NULL;
content_info.environ_get = NULL;
if (menu_path && !string_is_empty(menu_path))
fill_pathname_join(new_path, menu_path, path,
sizeof(new_path));
@ -2480,6 +2485,7 @@ static int action_ok_file_load_imageviewer(const char *path,
content_info.args = NULL;
content_info.environ_get = NULL;
if (menu_path && !string_is_empty(menu_path))
fill_pathname_join(fullpath, menu_path, path,
sizeof(fullpath));
@ -3005,7 +3011,6 @@ static int action_ok_core_content_download(const char *path,
menu_entries_get_last_stack(&menu_path, &menu_label, NULL, &enum_idx, NULL);
return action_ok_download_generic(path, label,
menu_path, type, idx, entry_idx,
MENU_ENUM_LABEL_CB_CORE_CONTENT_DOWNLOAD);