File tree Expand file tree Collapse file tree
musikr/src/main/java/org/oxycblt/musikr/fs/device Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ internal class DeviceFSCache(private val context: Context) {
178178 suspend fun saveCache () =
179179 withContext(Dispatchers .IO ) {
180180 try {
181- val cacheFile = File (context.cacheDir , CACHE_FILE_NAME )
181+ val cacheFile = File (context.filesDir , CACHE_FILE_NAME )
182182 val cacheData = CacheData (schemaVersion = SCHEMA_VERSION , entries = cache)
183183 cacheFile.writeText(Json .encodeToString(CacheData .serializer(), cacheData))
184184 } catch (e: Exception ) {
@@ -190,7 +190,7 @@ internal class DeviceFSCache(private val context: Context) {
190190 suspend fun loadCache () =
191191 withContext(Dispatchers .IO ) {
192192 try {
193- val cacheFile = File (context.cacheDir , CACHE_FILE_NAME )
193+ val cacheFile = File (context.filesDir , CACHE_FILE_NAME )
194194 if (cacheFile.exists()) {
195195 val cacheDataString = cacheFile.readText()
196196 val cacheData = Json .decodeFromString<CacheData >(cacheDataString)
You can’t perform that action at this time.
0 commit comments