You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Fixed rewritten java code being java-styled in kotlin
Fixed accessing kotlin code illegally via companion helper
This commit is contained in:
@@ -9,16 +9,16 @@ import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipInputStream
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun unzip(zip: File, folder: File, path: String = "", junkPath: Boolean = false) {
|
||||
zip.inputStream().buffered().use {
|
||||
unzip(it, folder, path, junkPath)
|
||||
fun File.unzip(folder: File, path: String = "", junkPath: Boolean = false) {
|
||||
inputStream().buffered().use {
|
||||
it.unzip(folder, path, junkPath)
|
||||
}
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun unzip(zip: InputStream, folder: File, path: String, junkPath: Boolean) {
|
||||
fun InputStream.unzip(folder: File, path: String, junkPath: Boolean) {
|
||||
try {
|
||||
val zin = ZipInputStream(zip)
|
||||
val zin = ZipInputStream(this)
|
||||
var entry: ZipEntry
|
||||
while (true) {
|
||||
entry = zin.nextEntry ?: break
|
||||
|
||||
Reference in New Issue
Block a user