Create filL_short_pathname_representation_noext

This commit is contained in:
twinaphex 2016-06-28 12:49:37 +02:00
parent 0709f2b11b
commit c03e566eba
3 changed files with 11 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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));