From 20ebbcbaaea9df44117bb6635dd1f21a9cb4c4f7 Mon Sep 17 00:00:00 2001 From: euxane Date: Wed, 18 Sep 2024 23:41:13 +0200 Subject: app/paths: migrate external files back to private internal storage --- app/src/main/java/org/pacien/tincapp/context/StorageMigrator.kt | 6 +++--- 1 file 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 { } private fun migrateConfigurationDirectory() { - val oldConfigDir = context.filesDir + val oldConfigDir = context.getExternalFilesDir(null) if (oldConfigDir == null || oldConfigDir.listFiles().isNullOrEmpty()) return // nothing to do try { - val newConfigDir = context.getExternalFilesDir(null)!! + val newConfigDir = context.filesDir log.info( "Migrating files present in old configuration directory at {} to {}", oldConfigDir.absolutePath, @@ -57,7 +57,7 @@ class StorageMigrator { } private fun migrateLogDirectory() { - val oldLogDir = context.cacheDir + val oldLogDir = context.externalCacheDir if (oldLogDir == null || oldLogDir.listFiles().isNullOrEmpty()) return // nothing to do try { -- cgit v1.2.3