Skip to content

Commit

Permalink
Use externalCacheDir
Browse files Browse the repository at this point in the history
No access to cacheDir in adb mode
  • Loading branch information
SanmerDev committed Feb 24, 2024
1 parent 7e3d678 commit 4726715
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dev.sanmer.pi.utils.extensions

import android.content.Context

val Context.tmpDir get() = cacheDir.resolve("tmp")
val Context.tmpDir get() = checkNotNull(externalCacheDir).resolve("tmp")
.apply {
if (!exists()) mkdirs()
}

0 comments on commit 4726715

Please sign in to comment.