diff --git a/patches/src/main/kotlin/app/revanced/patches/all/misc/resources/AddResourcesPatch.kt b/patches/src/main/kotlin/app/revanced/patches/all/misc/resources/AddResourcesPatch.kt index fed38b963..f32986ea6 100644 --- a/patches/src/main/kotlin/app/revanced/patches/all/misc/resources/AddResourcesPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/all/misc/resources/AddResourcesPatch.kt @@ -359,15 +359,15 @@ val addResourcesPatch = resourcePatch( } getOrPut(resourceFileName) { - val targetFile = this@finalize["res/$value/$resourceFileName.xml"].also { + this@finalize["res/$value/$resourceFileName.xml"].also { it.parentFile?.mkdirs() if (it.createNewFile()) { it.writeText("\n\n") } } - - document(targetFile.path).let { document -> + + document("res/$value/$resourceFileName.xml").let { document -> // Save the target node here as well // in order to avoid having to call document.getNode("resources")