From b5dc5470a4cef20983ac16c9444426c56a66fcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Sat, 16 Apr 2016 02:10:30 +0700 Subject: [PATCH] (XMB) Thumbnails: workaround for titles containing slashes --- menu/drivers/xmb.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 5e915a2280..6e99111ef7 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -591,6 +591,7 @@ static void xmb_update_thumbnail_path(xmb_handle_t *xmb, unsigned i) { menu_entry_t entry; settings_t *settings = config_get_ptr(); + char *tmp = NULL; menu_entry_get(&entry, 0, i, NULL, true); @@ -598,8 +599,15 @@ static void xmb_update_thumbnail_path(xmb_handle_t *xmb, unsigned i) xmb->title_name, sizeof(xmb->thumbnail_file_path)); fill_pathname_join(xmb->thumbnail_file_path, xmb->thumbnail_file_path, xmb_thumbnails_ident(), sizeof(xmb->thumbnail_file_path)); - fill_pathname_join(xmb->thumbnail_file_path, xmb->thumbnail_file_path, - entry.path, sizeof(xmb->thumbnail_file_path)); + + tmp = string_replace_substring(entry.path, "/", "-"); + + if (tmp) + { + fill_pathname_join(xmb->thumbnail_file_path, xmb->thumbnail_file_path, + tmp, sizeof(xmb->thumbnail_file_path)); + free(tmp); + } strlcat(xmb->thumbnail_file_path, ".png", sizeof(xmb->thumbnail_file_path)); }