diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncEphemeralTemporaryStore.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncEphemeralTemporaryStore.kt index c95c3bff91..8c68e224dc 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncEphemeralTemporaryStore.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncEphemeralTemporaryStore.kt @@ -40,7 +40,9 @@ internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor( ) : RoomSyncEphemeralTemporaryStore { private val workingDir: File by lazy { - File(fileDirectory, "rr").also { it.mkdirs() } + File(fileDirectory, "rr").also { + it.mkdirs() + } } private val roomSyncEphemeralAdapter = moshi.adapter(RoomSyncEphemeral::class.java) diff --git a/vector/src/main/java/im/vector/app/features/voice/AbstractVoiceRecorder.kt b/vector/src/main/java/im/vector/app/features/voice/AbstractVoiceRecorder.kt index 794130d528..786920aa22 100644 --- a/vector/src/main/java/im/vector/app/features/voice/AbstractVoiceRecorder.kt +++ b/vector/src/main/java/im/vector/app/features/voice/AbstractVoiceRecorder.kt @@ -28,9 +28,7 @@ abstract class AbstractVoiceRecorder( ) : VoiceRecorder { private val outputDirectory: File by lazy { File(context.cacheDir, "voice_records").also { - if (!it.exists()) { - it.mkdirs() - } + it.mkdirs() } } diff --git a/vector/src/main/java/im/vector/app/features/voice/VoicePlayerHelper.kt b/vector/src/main/java/im/vector/app/features/voice/VoicePlayerHelper.kt index 64b06a72f8..d2f7927d75 100644 --- a/vector/src/main/java/im/vector/app/features/voice/VoicePlayerHelper.kt +++ b/vector/src/main/java/im/vector/app/features/voice/VoicePlayerHelper.kt @@ -29,9 +29,7 @@ class VoicePlayerHelper @Inject constructor( ) { private val outputDirectory: File by lazy { File(context.cacheDir, "voice_records").also { - if (!it.exists()) { - it.mkdirs() - } + it.mkdirs() } }