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 b7fa2a68a..ed944012a 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 @@ -40,7 +40,21 @@ object Restore { } } } else { - + try { + val file = File(path) + for (fileName in Backup.backupFileNames) { + FileUtils.getFile(file, fileName).let { + if (it.exists()) { + it.copyTo( + FileUtils.createFileIfNotExist(Backup.backupPath + File.separator + fileName), + true + ) + } + } + } + } catch (e: Exception) { + e.printStackTrace() + } } } restore(Backup.backupPath)