diff --git a/src/main/kotlin/app/revanced/cli/Patcher.kt b/src/main/kotlin/app/revanced/cli/Patcher.kt index 0eac7b9..779f1d9 100644 --- a/src/main/kotlin/app/revanced/cli/Patcher.kt +++ b/src/main/kotlin/app/revanced/cli/Patcher.kt @@ -6,6 +6,7 @@ import app.revanced.utils.patcher.applyPatchesPrint import app.revanced.utils.patcher.mergeFiles import app.revanced.utils.signing.Signer import java.io.File +import java.io.FileFilter internal class Patcher { internal companion object { @@ -30,7 +31,7 @@ internal class Patcher { } if (MainCommand.patchResources) { - for (file in File(MainCommand.cacheDirectory).resolve("build/").listFiles()?.first()?.listFiles()!!) { + for (file in File(MainCommand.cacheDirectory).resolve("build/").listFiles(FileFilter { it.isDirectory })?.first()?.listFiles()!!) { if (!file.isDirectory) { zipFileSystem.replaceFile(file.name, file.readBytes()) continue