Fix #1589 - only remove "unsafe" characters if configured to do so.
This commit is contained in:
parent
e50408ee0b
commit
5dd5826921
1 changed files with 9 additions and 2 deletions
|
@ -126,10 +126,17 @@ cleanupfilename(char *s, int dvr_flags)
|
|||
{
|
||||
int i, len = strlen(s);
|
||||
for(i = 0; i < len; i++) {
|
||||
if((dvr_flags & DVR_WHITESPACE_IN_TITLE) && (s[i] == ' ' || s[i] == '\t'))
|
||||
|
||||
if(s[i] == '/')
|
||||
s[i] = '-';
|
||||
|
||||
else 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))
|
||||
else if((dvr_flags & DVR_CLEAN_TITLE) &&
|
||||
((s[i] < 32) || (s[i] > 122) ||
|
||||
(strchr("/:\\<>|*?'\"", s[i]) != NULL)))
|
||||
s[i] = '-';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue