From 9a613e374ec8967a9101f1f7ffbf0a46e782334d Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Thu, 11 Jul 2019 00:32:10 +0300 Subject: [PATCH] patchport: Fix a bug preventing patches from being ported --- patchport.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/patchport.py b/patchport.py index 2038199..8480c89 100644 --- a/patchport.py +++ b/patchport.py @@ -20,6 +20,9 @@ cutthecord_folder = os.path.dirname(os.path.realpath(__file__)) debug = False tmp_folder = "/tmp/patchport" +if debug: + print(f"ctc folder: {cutthecord_folder}") + def modify_patch(patch_name, patch_path): with open(patch_path) as f: @@ -112,8 +115,13 @@ with open(os.path.join(apk_folder, "res", "values", "strings.xml")) as f: failures = [] for patch in os.listdir(os.path.join(cutthecord_folder, "patches")): + if debug: + print(f"going over patch: {patch}") + # Ignore non-dirs - if not os.path.isdir(patch): + if not os.path.isdir(os.path.join(cutthecord_folder, "patches", patch)): + if debug: + print(f"patch is not a folder, skipping: {patch}") continue patch_path = os.path.join(cutthecord_folder, "patches", patch,