Use internal cache dir as temporary backup dir
This commit is contained in:
parent
f8f82e6294
commit
6989c90fbe
@ -36,7 +36,7 @@ class BackupManager(
|
|||||||
|
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
val outputStream = context.contentResolver.openOutputStream(uri) ?: return@withContext null
|
val outputStream = context.contentResolver.openOutputStream(uri) ?: return@withContext null
|
||||||
val backupDir = File(context.externalCacheDir, "backup")
|
val backupDir = File(context.cacheDir, "backup")
|
||||||
if (backupDir.exists()) {
|
if (backupDir.exists()) {
|
||||||
backupDir.deleteRecursively()
|
backupDir.deleteRecursively()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user