diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt | 6 |
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 { |