Fix #1569 - dvr: simplify filename cleanup
This commit is contained in:
parent
8f5d8fe9bf
commit
43ae54c062
1 changed files with 4 additions and 5 deletions
|
@ -126,12 +126,11 @@ cleanupfilename(char *s, int dvr_flags)
|
|||
{
|
||||
int i, len = strlen(s);
|
||||
for(i = 0; i < len; i++) {
|
||||
if(s[i] == '/' || s[i] == ':' || s[i] == '\\' || s[i] == '<' ||
|
||||
s[i] == '>' || s[i] == '|' || s[i] == '*' || s[i] == '?')
|
||||
s[i] = '-';
|
||||
|
||||
if((dvr_flags & DVR_WHITESPACE_IN_TITLE) && s[i] == ' ')
|
||||
if((dvr_flags & DVR_WHITESPACE_IN_TITLE) && (s[i] == ' ' || s[i] == '\t'))
|
||||
s[i] = '-';
|
||||
|
||||
if((s[i] < 32) || (s[i] > 122) || (strchr("/:\\<>|*?'\"", s[i]) != NULL))
|
||||
s[i] = '-';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue