delaying working dir creation to when its needed, lazy is sychronised by default
This commit is contained in:
parent
8d668cc118
commit
c2ce10f89c
|
@ -39,8 +39,9 @@ internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor(
|
||||||
moshi: Moshi
|
moshi: Moshi
|
||||||
) : RoomSyncEphemeralTemporaryStore {
|
) : RoomSyncEphemeralTemporaryStore {
|
||||||
|
|
||||||
private val workingDir = File(fileDirectory, "rr")
|
private val workingDir: File by lazy {
|
||||||
.also { it.mkdirs() }
|
File(fileDirectory, "rr").also { it.mkdirs() }
|
||||||
|
}
|
||||||
|
|
||||||
private val roomSyncEphemeralAdapter = moshi.adapter(RoomSyncEphemeral::class.java)
|
private val roomSyncEphemeralAdapter = moshi.adapter(RoomSyncEphemeral::class.java)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue