mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-03 17:02:54 +01:00
fix: only accept directories when looking for files in resource patch
This commit is contained in:
parent
d946333c96
commit
c76da7e5ff
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user