mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
commit
60005e6179
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue