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 e8f74bbd48..c95c3bff91 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 @@ -39,8 +39,9 @@ internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor( moshi: Moshi ) : RoomSyncEphemeralTemporaryStore { - private val workingDir = File(fileDirectory, "rr") - .also { it.mkdirs() } + private val workingDir: File by lazy { + File(fileDirectory, "rr").also { it.mkdirs() } + } private val roomSyncEphemeralAdapter = moshi.adapter(RoomSyncEphemeral::class.java)