From 441a84ef66accea7735aa551b22602bf5fd7f057 Mon Sep 17 00:00:00 2001 From: rushiiMachine <33725716+rushiiMachine@users.noreply.github.com> Date: Sat, 11 Jan 2025 12:48:44 -0800 Subject: [PATCH] fix(SmaliPatching): remove CRLF and trailing newlines --- .../com/aliucord/manager/patcher/steps/patch/SmaliPatchStep.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/aliucord/manager/patcher/steps/patch/SmaliPatchStep.kt b/app/src/main/kotlin/com/aliucord/manager/patcher/steps/patch/SmaliPatchStep.kt index 676687d..2ed6b08 100644 --- a/app/src/main/kotlin/com/aliucord/manager/patcher/steps/patch/SmaliPatchStep.kt +++ b/app/src/main/kotlin/com/aliucord/manager/patcher/steps/patch/SmaliPatchStep.kt @@ -47,6 +47,8 @@ class SmaliPatchStep : Step(), IDexProvider, KoinComponent { val lines = zip.openEntry(patchFile)!!.read() .decodeToString() + .replace("\r\n", "\n") // Replace CRLF endings with LF endings to be sure here + .trimEnd { it == '\n' } // Remove trailing new lines to work with diff output properly .split('\n') try {