removing redundant exists() checks, mkdirs already does this
This commit is contained in:
parent
8525925732
commit
23f8d05522
|
@ -40,7 +40,9 @@ internal class RoomSyncEphemeralTemporaryStoreFile @Inject constructor(
|
||||||
) : RoomSyncEphemeralTemporaryStore {
|
) : RoomSyncEphemeralTemporaryStore {
|
||||||
|
|
||||||
private val workingDir: File by lazy {
|
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)
|
private val roomSyncEphemeralAdapter = moshi.adapter(RoomSyncEphemeral::class.java)
|
||||||
|
|
|
@ -28,9 +28,7 @@ abstract class AbstractVoiceRecorder(
|
||||||
) : VoiceRecorder {
|
) : VoiceRecorder {
|
||||||
private val outputDirectory: File by lazy {
|
private val outputDirectory: File by lazy {
|
||||||
File(context.cacheDir, "voice_records").also {
|
File(context.cacheDir, "voice_records").also {
|
||||||
if (!it.exists()) {
|
it.mkdirs()
|
||||||
it.mkdirs()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,7 @@ class VoicePlayerHelper @Inject constructor(
|
||||||
) {
|
) {
|
||||||
private val outputDirectory: File by lazy {
|
private val outputDirectory: File by lazy {
|
||||||
File(context.cacheDir, "voice_records").also {
|
File(context.cacheDir, "voice_records").also {
|
||||||
if (!it.exists()) {
|
it.mkdirs()
|
||||||
it.mkdirs()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue