Updated Removal of Illegal char fun.(Bug-Fixed)

This commit is contained in:
shabinder 2020-07-30 15:32:48 +05:30
parent b62143392c
commit 3df41fbe87

View File

@ -166,13 +166,20 @@ object DownloadHelper {
'\"',
'.',
':',
'-'
'-',
'\''
)
var name = fileName
for (c in illegalCharArray) {
name = fileName.replace(c, '_')
}
name = name.replace("\\s".toRegex(), "_")
name = name.replace("\\)".toRegex(), "")
name = name.replace("\\(".toRegex(), "")
name = name.replace("\\[".toRegex(), "")
name = name.replace("]".toRegex(), "")
name = name.replace("\\.".toRegex(), "")
return name
}
}