mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-18 07:11:58 +03:00
#6449 Remove test logging for file name
This commit is contained in:
parent
686ca0512f
commit
11f6987a98
1 changed files with 0 additions and 2 deletions
|
@ -27,12 +27,10 @@ import timber.log.Timber
|
||||||
fun safeFileName(fileName: String?, mimeType: String?): String {
|
fun safeFileName(fileName: String?, mimeType: String?): String {
|
||||||
return buildString {
|
return buildString {
|
||||||
// filename has to be safe for the Android System
|
// filename has to be safe for the Android System
|
||||||
Timber.i("ISSUE: FileService: original fileName $fileName")
|
|
||||||
val result = fileName
|
val result = fileName
|
||||||
?.replace("[\\\\?%*:|\"<>\\s]".toRegex(), "_")
|
?.replace("[\\\\?%*:|\"<>\\s]".toRegex(), "_")
|
||||||
?.takeIf { it.isNotEmpty() }
|
?.takeIf { it.isNotEmpty() }
|
||||||
?: DEFAULT_FILENAME
|
?: DEFAULT_FILENAME
|
||||||
Timber.i("ISSUE: FileService: safeFileName $result")
|
|
||||||
append(result)
|
append(result)
|
||||||
// Check that the extension is correct regarding the mimeType
|
// Check that the extension is correct regarding the mimeType
|
||||||
val extensionFromMime = mimeType?.let { MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType) }
|
val extensionFromMime = mimeType?.let { MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType) }
|
||||||
|
|
Loading…
Reference in a new issue