mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +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 {
|
||||
return buildString {
|
||||
// filename has to be safe for the Android System
|
||||
Timber.i("ISSUE: FileService: original fileName $fileName")
|
||||
val result = fileName
|
||||
?.replace("[\\\\?%*:|\"<>\\s]".toRegex(), "_")
|
||||
?.takeIf { it.isNotEmpty() }
|
||||
?: DEFAULT_FILENAME
|
||||
Timber.i("ISSUE: FileService: safeFileName $result")
|
||||
append(result)
|
||||
// Check that the extension is correct regarding the mimeType
|
||||
val extensionFromMime = mimeType?.let { MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType) }
|
||||
|
|
Loading…
Reference in a new issue