Skip to content

Commit

Permalink
#6449 Remove test logging for file name
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrowlands committed Oct 16, 2024
1 parent 686ca05 commit 11f6987
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit 11f6987

Please sign in to comment.