additional fixes per the PR discussion

This commit is contained in:
markwkidd 2016-11-15 14:01:28 -05:00 committed by GitHub
parent d0f23fdddb
commit 096b316183
1 changed files with 33 additions and 10 deletions

View File

@ -862,16 +862,39 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
xmb_thumbnails_ident(), sizeof(xmb->thumbnail_file_path)); xmb_thumbnails_ident(), sizeof(xmb->thumbnail_file_path));
/* Scrub characters that are not cross-platform safe from 'display name' in playlist and replace with underscore */ /* Scrub characters that are not cross-platform safe from 'display name' in playlist and replace with underscore */
tmp = string_replace_substring(entry.path, "&", "_"); char *scrub_char_pointer = 0;
tmp = string_replace_substring(entry.path, "\\", "_"); *tmp = *entry.path;
tmp = string_replace_substring(entry.path, "/", "_");
tmp = string_replace_substring(entry.path, "\?", "_"); while ((scrub_char_pointer = strchr (tmp, '&')) != NULL) {
tmp = string_replace_substring(entry.path, ":", "_"); *scrub_char_pointer = '_';
tmp = string_replace_substring(entry.path, ";", "_"); }
tmp = string_replace_substring(entry.path, "<", "_"); while ((scrub_char_pointer = strchr (tmp, '\\')) != NULL) {
tmp = string_replace_substring(entry.path, ">", "_"); *scrub_char_pointer = '_';
tmp = string_replace_substring(entry.path, "*", "_"); }
tmp = string_replace_substring(entry.path, "|", "_"); while ((scrub_char_pointer = strchr (tmp, '/')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, '?')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, ':')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, '`')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, '<')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, '>')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, '*')) != NULL) {
*scrub_char_pointer = '_';
}
while ((scrub_char_pointer = strchr (tmp, '_')) != NULL) {
*scrub_char_pointer = '_';
}
/* Look for thumbnail file with the scrubbed filename */ /* Look for thumbnail file with the scrubbed filename */