mirror of
https://github.com/gedoor/legado.git
synced 2024-09-03 09:55:00 +08:00
优化
This commit is contained in:
parent
5d83cf9726
commit
cd4eda3b3b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user