mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
change thumbnail filename scrub to use strpbrk()
This commit is contained in:
parent
08514679d5
commit
9d0e5c012e
@ -865,40 +865,13 @@ static void xmb_update_thumbnail_path(void *data, unsigned i)
|
|||||||
char *scrub_char_pointer = 0;
|
char *scrub_char_pointer = 0;
|
||||||
tmp = strdup(entry.path);
|
tmp = strdup(entry.path);
|
||||||
|
|
||||||
while ((scrub_char_pointer = strchr(tmp, '&')) != NULL) {
|
while(scrub_char_pointer = strpbrk(tmp, "&*/:`<>?\|"))
|
||||||
*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 = '_';
|
|
||||||
}
|
|
||||||
while ((scrub_char_pointer = strchr(tmp, '*')) != NULL) {
|
|
||||||
*scrub_char_pointer = '_';
|
|
||||||
}
|
|
||||||
while ((scrub_char_pointer = strchr(tmp, '|')) != NULL) {
|
|
||||||
*scrub_char_pointer = '_';
|
*scrub_char_pointer = '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look for thumbnail file with the scrubbed filename */
|
/* Look for thumbnail file with the scrubbed filename */
|
||||||
|
if (tmp)
|
||||||
if (tmp)
|
|
||||||
{
|
{
|
||||||
char tmp_new[PATH_MAX_LENGTH];
|
char tmp_new[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user