(RMenu) Properly goes back now a prev dir for select_directory/select_file

This commit is contained in:
twinaphex 2013-09-28 02:40:24 +02:00
parent 725be8ff94
commit 488e0d10ea
1 changed files with 14 additions and 2 deletions

View File

@ -798,7 +798,13 @@ static int select_file(void *data, uint64_t action)
}
break;
case RGUI_ACTION_CANCEL:
pop_menu_stack = true;
{
char tmp_str[PATH_MAX];
fill_pathname_parent_dir(tmp_str, rgui->browser->current_dir.directory_path, sizeof(tmp_str));
if (tmp_str[0] == '\0')
pop_menu_stack = true;
}
break;
case RGUI_ACTION_MAPPING_PREVIOUS:
if (rgui->menu_type == FILE_BROWSER_MENU)
@ -873,7 +879,13 @@ static int select_directory(void *data, uint64_t action)
break;
#endif
case RGUI_ACTION_CANCEL:
pop_menu_stack = true;
{
char tmp_str[PATH_MAX];
fill_pathname_parent_dir(tmp_str, rgui->browser->current_dir.directory_path, sizeof(tmp_str));
if (tmp_str[0] == '\0')
pop_menu_stack = true;
}
break;
}