diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index e2b8af1d18..febfcac63a 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -648,3 +648,10 @@ void fill_short_pathname_representation(char* out_rep, #endif strlcpy(out_rep, path_short, size); } + +void fill_short_pathname_representation_noext(char* out_rep, + const char *in_path, size_t size) +{ + fill_short_pathname_representation(out_rep, in_path, size); + path_remove_extension(out_rep); +} diff --git a/libretro-common/include/file/file_path.h b/libretro-common/include/file/file_path.h index 527cdeebf7..a4a9a9063d 100644 --- a/libretro-common/include/file/file_path.h +++ b/libretro-common/include/file/file_path.h @@ -349,6 +349,9 @@ void fill_pathname_join_delim(char *out_path, const char *dir, void fill_short_pathname_representation(char* out_rep, const char *in_path, size_t size); +void fill_short_pathname_representation_noext(char* out_rep, + const char *in_path, size_t size); + void fill_pathname_expand_special(char *out_path, const char *in_path, size_t size); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index be138e1038..f83bff0491 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -1739,9 +1739,8 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) if (!db_info) goto error; - fill_short_pathname_representation(path_base, info->path, + fill_short_pathname_representation_noext(path_base, info->path, sizeof(path_base)); - path_remove_extension(path_base); strlcat(path_base, file_path_str(FILE_PATH_LPL_EXTENSION), sizeof(path_base));