This commit is contained in:
Horis
2023-05-03 16:15:50 +08:00
parent 119f2e22c5
commit e2f8a19cfb
@@ -70,11 +70,16 @@ object Restore {
} else { } else {
ZipUtils.unZipToPath(File(uri.path!!), Backup.backupPath) ZipUtils.unZipToPath(File(uri.path!!), Backup.backupPath)
} }
}.onSuccess { }.onFailure {
AppLog.put("复制解压文件出错\n${it.localizedMessage}", it)
return
}
kotlin.runCatching {
restore(Backup.backupPath) restore(Backup.backupPath)
LocalConfig.lastBackup = System.currentTimeMillis() LocalConfig.lastBackup = System.currentTimeMillis()
}.onFailure { }.onFailure {
AppLog.put("复制解压文件出错\n${it.localizedMessage}", it) appCtx.toastOnUi("恢复备份出错\n${it.localizedMessage}")
AppLog.put("恢复备份出错\n${it.localizedMessage}", it)
} }
} }