From 06a8e0b8ec3d61fd571b3784534766a9b850caea Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Mon, 7 Oct 2024 23:19:04 +0700 Subject: [PATCH] Fix handling of missing executable path in kext parsing --- Scripts/kext_maestro.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index ff914a8..603d2b1 100644 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -310,14 +310,14 @@ class KextMaestro: if not isinstance(bundle_info.get("CFBundleIdentifier", None), (str, unicode)): continue - executable_path = os.path.join("Contents", "MacOS", bundle_info.get("CFBundleExecutable", "None")).replace("\\", "/").lstrip("/") - if not os.path.exists(os.path.join(kexts_directory, kexts_directory, executable_path)): + executable_path = os.path.join("Contents", "MacOS", bundle_info.get("CFBundleExecutable", "None")) + if not os.path.exists(os.path.join(kexts_directory, kext_path, executable_path)): executable_path = "" bundle_list.append({ "BundlePath": kext_path.replace("\\", "/").lstrip("/"), "Enabled": True, - "ExecutablePath": executable_path, + "ExecutablePath": executable_path.replace("\\", "/").lstrip("/"), "PlistPath": plist_path.replace("\\", "/").lstrip("/"), "BundleIdentifier": bundle_info.get("CFBundleIdentifier"), "BundleVersion": bundle_info.get("CFBundleVersion"),