From 5d1e7a7aec31fb37eacb280a9a5fa74ab45a7e03 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 26 May 2015 00:31:03 +0200 Subject: [PATCH] (menu_displaylist.c) Cleanup --- menu/menu_displaylist.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 644a98d1ae..fbfa54984f 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -742,9 +742,15 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info, fill_short_pathname_representation(path_short, path, sizeof(path_short)); - snprintf(fill_buf,sizeof(fill_buf),"%s (%s)", - (label && label[0] != '\0') ? label : path_short, - core_name); + snprintf(fill_buf,sizeof(fill_buf),"%s", + (label && label[0] != '\0') ? label : path_short); + + if (core_name && core_name[0] != '\0') + { + char tmp[PATH_MAX_LENGTH]; + snprintf(tmp, sizeof(tmp), " (%s)", core_name); + strlcat(fill_buf, tmp, sizeof(fill_buf)); + } } if (!strcmp(path_playlist, "collection"))