This commit is contained in:
twinaphex 2015-01-25 01:48:58 +01:00
parent 724e748254
commit 5a48d593d3
2 changed files with 13 additions and 12 deletions

View File

@ -479,11 +479,11 @@ static int action_ok_path_use_directory(const char *path,
if (!setting)
return -1;
if (setting->type == ST_DIR)
{
if (setting->type != ST_DIR)
return -1;
menu_action_setting_set_current_string(setting, menu_path);
menu_list_pop_stack_by_needle(driver.menu->menu_list, setting->name);
}
return 0;
}

View File

@ -266,15 +266,15 @@ void menu_list_pop_stack(menu_list_t *list)
if (!list)
return;
if (file_list_get_size(list->menu_stack) > 1)
{
if (file_list_get_size(list->menu_stack) <= 1)
return;
if (driver.menu_ctx->list_cache)
driver.menu_ctx->list_cache(false, 0);
menu_list_pop(list->menu_stack, &driver.menu->selection_ptr);
driver.menu->need_refresh = true;
}
}
void menu_list_pop_stack_by_needle(menu_list_t *list,
const char *needle)
@ -288,6 +288,7 @@ void menu_list_pop_stack_by_needle(menu_list_t *list,
driver.menu->need_refresh = true;
file_list_get_last(list->menu_stack, &path, &label, &type);
while (strcmp(needle, label) == 0)
{
menu_list_pop(list->menu_stack, &driver.menu->selection_ptr);