From 4a010a7a2af513bb9e5e6bea68d97e0565d6630e Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Tue, 19 Apr 2022 13:31:13 +0200 Subject: [PATCH] Removes runCatching from TemporaryFileCreator --- .../android/sdk/internal/util/TemporaryFileCreator.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt index c2705916e0..dddd789212 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/TemporaryFileCreator.kt @@ -28,10 +28,8 @@ internal class TemporaryFileCreator @Inject constructor( ) { suspend fun create(): File { return withContext(Dispatchers.IO) { - runCatching { - File.createTempFile(UUID.randomUUID().toString(), null, context.cacheDir) - .apply { mkdirs() } - }.getOrThrow() + File.createTempFile(UUID.randomUUID().toString(), null, context.cacheDir) + .apply { mkdirs() } } } }