From 1aca911fe3bb0b7573b9a48afc2df20ed89c3745 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 16 Mar 2013 11:16:55 +0100 Subject: [PATCH] Fix file browser on PC. --- frontend/menu/rgui.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 75130253cf..ac8db48cab 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -1356,7 +1356,12 @@ static bool directory_parse(const char *directory, void *userdata, void *ctx) )) continue; - rgui_list_push(ctx, path_basename(list->elems[i].data), + // Need to preserve slash first time. + const char *path = list->elems[i].data; + if (*directory) + path = path_basename(path); + + rgui_list_push(ctx, path, is_dir ? RGUI_FILE_DIRECTORY : RGUI_FILE_PLAIN, 0); }