aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authoreuxane2024-09-18 23:41:13 +0200
committereuxane2024-09-18 23:41:13 +0200
commit20ebbcbaaea9df44117bb6635dd1f21a9cb4c4f7 (patch)
tree1525fd0cf137782f10eca1f800e35a1cca359101 /app/src/main
parentec3ed8359e80310927770ce5de02a5095ebf9a00 (diff)
downloadtincapp-20ebbcbaaea9df44117bb6635dd1f21a9cb4c4f7.tar.gz
app/paths: migrate external files back to private internal storage
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt b/app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt
index d8bb4a8..855827c 100644
--- a/app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt
+++ b/app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt
@@ -38,11 +38,11 @@ class StorageMigrator {
38 } 38 }
39 39
40 private fun migrateConfigurationDirectory() { 40 private fun migrateConfigurationDirectory() {
41 val oldConfigDir = context.filesDir 41 val oldConfigDir = context.getExternalFilesDir(null)
42 if (oldConfigDir == null || oldConfigDir.listFiles().isNullOrEmpty()) return // nothing to do 42 if (oldConfigDir == null || oldConfigDir.listFiles().isNullOrEmpty()) return // nothing to do
43 43
44 try { 44 try {
45 val newConfigDir = context.getExternalFilesDir(null)!! 45 val newConfigDir = context.filesDir
46 log.info( 46 log.info(
47 "Migrating files present in old configuration directory at {} to {}", 47 "Migrating files present in old configuration directory at {} to {}",
48 oldConfigDir.absolutePath, 48 oldConfigDir.absolutePath,
@@ -57,7 +57,7 @@ class StorageMigrator {
57 } 57 }
58 58
59 private fun migrateLogDirectory() { 59 private fun migrateLogDirectory() {
60 val oldLogDir = context.cacheDir 60 val oldLogDir = context.externalCacheDir
61 if (oldLogDir == null || oldLogDir.listFiles().isNullOrEmpty()) return // nothing to do 61 if (oldLogDir == null || oldLogDir.listFiles().isNullOrEmpty()) return // nothing to do
62 62
63 try { 63 try {