mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 14:45:47 +03:00
Update new names
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
a845acf187
commit
f0cd067b5f
3 changed files with 4 additions and 4 deletions
|
@ -19,7 +19,7 @@ fun OCCapability.forbiddenFilenameCharacters(): List<String> = jsonToList(forbid
|
|||
|
||||
fun OCCapability.forbiddenFilenameExtension(): List<String> = jsonToList(forbiddenFilenameExtensionJson)
|
||||
|
||||
fun OCCapability.forbiddenFilenameBaseNames(): List<String> = jsonToList(forbiddenFilenameBaseNames)
|
||||
fun OCCapability.forbiddenFilenameBaseNames(): List<String> = jsonToList(forbiddenFilenameBaseNamesJson)
|
||||
|
||||
@Suppress("ReturnCount")
|
||||
private fun jsonToList(json: String?): List<String> {
|
||||
|
|
|
@ -56,7 +56,7 @@ object FileNameValidator {
|
|||
return it
|
||||
}
|
||||
|
||||
capability.forbiddenFilenameBaseNames?.let {
|
||||
capability.forbiddenFilenameBaseNames().let {
|
||||
val forbiddenFilenameBaseNames = capability.forbiddenFilenameBaseNames().map { it.lowercase() }
|
||||
|
||||
if (forbiddenFilenameBaseNames.contains(filename.lowercase()) || forbiddenFilenameBaseNames.contains(
|
||||
|
|
|
@ -2056,7 +2056,7 @@ public class FileDataStorageManager {
|
|||
contentValues.put(ProviderTableMeta.CAPABILITIES_FORBIDDEN_FILENAME_CHARACTERS, capability.getForbiddenFilenameCharactersJson());
|
||||
contentValues.put(ProviderTableMeta.CAPABILITIES_FORBIDDEN_FILENAMES, capability.getForbiddenFilenamesJson());
|
||||
contentValues.put(ProviderTableMeta.CAPABILITIES_FORBIDDEN_FORBIDDEN_FILENAME_EXTENSIONS, capability.getForbiddenFilenameExtensionJson());
|
||||
contentValues.put(ProviderTableMeta.CAPABILITIES_FORBIDDEN_FORBIDDEN_FILENAME_BASE_NAMES, capability.getForbiddenFilenameBaseNames());
|
||||
contentValues.put(ProviderTableMeta.CAPABILITIES_FORBIDDEN_FORBIDDEN_FILENAME_BASE_NAMES, capability.getForbiddenFilenameBaseNamesJson());
|
||||
|
||||
return contentValues;
|
||||
}
|
||||
|
@ -2230,7 +2230,7 @@ public class FileDataStorageManager {
|
|||
capability.setForbiddenFilenameCharactersJson(getString(cursor, ProviderTableMeta.CAPABILITIES_FORBIDDEN_FILENAME_CHARACTERS));
|
||||
capability.setForbiddenFilenamesJson(getString(cursor, ProviderTableMeta.CAPABILITIES_FORBIDDEN_FILENAMES));
|
||||
capability.setForbiddenFilenameExtensionJson(getString(cursor, ProviderTableMeta.CAPABILITIES_FORBIDDEN_FORBIDDEN_FILENAME_EXTENSIONS));
|
||||
capability.setForbiddenFilenameBaseNames(getString(cursor, ProviderTableMeta.CAPABILITIES_FORBIDDEN_FORBIDDEN_FILENAME_BASE_NAMES));
|
||||
capability.setForbiddenFilenameBaseNamesJson(getString(cursor, ProviderTableMeta.CAPABILITIES_FORBIDDEN_FORBIDDEN_FILENAME_BASE_NAMES));
|
||||
}
|
||||
|
||||
return capability;
|
||||
|
|
Loading…
Reference in a new issue