From 84577c1b93f596a53b15072101094cf363238ed4 Mon Sep 17 00:00:00 2001 From: Timo Strunk Date: Sun, 7 Sep 2014 17:15:02 +0200 Subject: [PATCH] Folders in 7zip archives are now correctly displayed in RGUI. --- frontend/menu/menu_entries.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/menu/menu_entries.c b/frontend/menu/menu_entries.c index d2a799e8da..8c6a274ffb 100644 --- a/frontend/menu/menu_entries.c +++ b/frontend/menu/menu_entries.c @@ -795,8 +795,9 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list) exts = g_extern.system.valid_extensions; struct string_list *str_list = NULL; + bool path_is_compressed = path_is_compressed_file(dir); - if (path_is_compressed_file(dir)) + if (path_is_compressed) { str_list = compressed_file_list_new(dir,exts); } @@ -838,11 +839,14 @@ int menu_parse_and_resolve(file_list_t *list, file_list_t *menu_list) if ((menu_common_type_is(label, menu_type) == MENU_FILE_DIRECTORY) && !is_dir) continue; + /* Need to preserve slash first time. */ const char *path = str_list->elems[i].data; - if (*dir) + + if (*dir && !path_is_compressed) path = path_basename(path); + #ifdef HAVE_LIBRETRO_MANAGEMENT #ifdef RARCH_CONSOLE if (!strcmp(label, "core_list") && (is_dir ||