fix: Use java.io.File.copyTo instead

This commit is contained in:
Alberto Ponces 2022-09-12 14:21:11 +01:00
parent 3bb5e70d1c
commit f67425cde3

View File

@ -18,8 +18,6 @@ import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.Result
import java.io.File
import java.nio.file.Files
import java.nio.file.StandardCopyOption
class MainActivity : FlutterActivity() {
private val PATCHER_CHANNEL = "app.revanced.manager.flutter/patcher"
@ -127,11 +125,7 @@ class MainActivity : FlutterActivity() {
)
)
}
Files.copy(
originalFile.toPath(),
inputFile.toPath(),
StandardCopyOption.REPLACE_EXISTING
)
originalFile.copyTo(inputFile, true)
handler.post {
installerChannel.invokeMethod(