Add forbiddenFilenameCharacterList values coming from server

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-07-03 12:37:03 +02:00 committed by Alper Öztürk
parent 5d36d76175
commit 5800a45c22

View file

@ -44,7 +44,9 @@ object FileNameValidator {
if (capability.forbiddenFilenameCharacters.isTrue) {
val invalidCharacter = name.find {
it.toString().matches(reservedWindowsChars) || it.toString().matches(reservedUnixChars)
it.toString().matches(reservedWindowsChars) ||
it.toString().matches(reservedUnixChars) ||
capability.forbiddenFilenameCharacterList.contains(it.toString())
}
if (invalidCharacter != null) {
return context.getString(R.string.file_name_validator_error_invalid_character, invalidCharacter)