pull/68/head^2
kunfei 5 years ago
parent 61345f3b67
commit df3cfe0899
  1. 2
      app/src/main/java/io/legado/app/data/AppDatabase.kt
  2. 2
      app/src/main/java/io/legado/app/help/storage/Restore.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()

@ -45,7 +45,7 @@ object Restore {
}
}
}
restore(Backup.defaultPath)
restore(Backup.backupPath)
}
suspend fun restore(path: String) {

Loading…
Cancel
Save