From df3cfe08996226492d7dd9d95f27e667466b1fdd Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 6 Jan 2020 22:00:39 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/data/AppDatabase.kt | 2 +- app/src/main/java/io/legado/app/help/storage/Restore.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/AppDatabase.kt b/app/src/main/java/io/legado/app/data/AppDatabase.kt index 0b43afd10..d65b43ada 100644 --- a/app/src/main/java/io/legado/app/data/AppDatabase.kt +++ b/app/src/main/java/io/legado/app/data/AppDatabase.kt @@ -31,7 +31,7 @@ abstract class AppDatabase : RoomDatabase() { .fallbackToDestructiveMigration() .addCallback(object : Callback() { override fun onDestructiveMigration(db: SupportSQLiteDatabase) { - GlobalScope.launch { Restore.restore(Backup.defaultPath) } + GlobalScope.launch { Restore.restore(Backup.backupPath) } } }) .build() diff --git a/app/src/main/java/io/legado/app/help/storage/Restore.kt b/app/src/main/java/io/legado/app/help/storage/Restore.kt index 801d27f01..a95626228 100644 --- a/app/src/main/java/io/legado/app/help/storage/Restore.kt +++ b/app/src/main/java/io/legado/app/help/storage/Restore.kt @@ -45,7 +45,7 @@ object Restore { } } } - restore(Backup.defaultPath) + restore(Backup.backupPath) } suspend fun restore(path: String) {