Merge pull request #13656 from nextcloud/fixType

Fix typo?
This commit is contained in:
Tobias Kaminsky 2024-09-30 14:13:57 +02:00 committed by GitHub
commit 60005e6179
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@ package com.nextcloud.utils.autoRename
import com.nextcloud.utils.extensions.StringConstants
import com.nextcloud.utils.extensions.forbiddenFilenameCharacters
import com.nextcloud.utils.extensions.forbiddenFilenameExtension
import com.nextcloud.utils.extensions.forbiddenFilenameExtensions
import com.nextcloud.utils.extensions.shouldRemoveNonPrintableUnicodeCharactersAndConvertToUTF8
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.resources.status.NextcloudVersion
@ -46,7 +46,7 @@ object AutoRename {
}
forbiddenFilenameExtensionJson?.let {
forbiddenFilenameExtension().forEach { forbiddenExtension ->
forbiddenFilenameExtensions().forEach { forbiddenExtension ->
pathSegments.replaceAll { segment ->
var modifiedSegment = segment
if (forbiddenExtension == StringConstants.SPACE) {

View file

@ -24,7 +24,7 @@ fun OCCapability.forbiddenFilenameBaseNames(): List<String> = jsonToList(forbidd
fun OCCapability.shouldRemoveNonPrintableUnicodeCharactersAndConvertToUTF8(): Boolean {
return forbiddenFilenames().isNotEmpty() ||
forbiddenFilenameCharacters().isNotEmpty() ||
forbiddenFilenameExtension().isNotEmpty() ||
forbiddenFilenameExtensions().isNotEmpty() ||
forbiddenFilenameBaseNames().isNotEmpty()
}