From d97e792d81cf4c0f221d2b919bddfc6091bf064b Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 28 May 2025 21:34:56 +0200 Subject: [PATCH] Apply suggestions from code review --- src/commonMain/kotlin/app/revanced/library/ApkUtils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/app/revanced/library/ApkUtils.kt b/src/commonMain/kotlin/app/revanced/library/ApkUtils.kt index 2ab66cb..7fd077f 100644 --- a/src/commonMain/kotlin/app/revanced/library/ApkUtils.kt +++ b/src/commonMain/kotlin/app/revanced/library/ApkUtils.kt @@ -53,7 +53,8 @@ object ApkUtils { fun PatcherResult.applyTo(apkFile: File) { ZFile.openReadWrite(apkFile, zFileOptions).use { targetApkZFile -> dexFiles.forEach { dexFile -> - dexFile.stream.use { targetApkZFile.add(dexFile.name, it) } + targetApkZFile.add(dexFile.name, dexFile.stream) + dexFile.stream.close() } resources?.let { resources ->