kdk_handler.py: Adjust logic

This commit is contained in:
Mykola Grymalyuk
2022-10-01 16:22:30 -06:00
parent e27ca8d160
commit f60af0446e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -174,6 +174,6 @@ class kernel_debug_kit_handler:
if Path("/Library/Developer/KDKs").exists(): if Path("/Library/Developer/KDKs").exists():
for file in Path("/Library/Developer/KDKs").iterdir(): for file in Path("/Library/Developer/KDKs").iterdir():
if file.is_dir(): if file.is_dir():
if build in file.name: if file.name.endswith(f"{build}.kdk"):
return True return True
return False return False
+1 -1
View File
@@ -128,7 +128,7 @@ class PatchSysVolume:
kdk_path = sys_patch_helpers.sys_patch_helpers(self.constants).determine_kdk_present(match_closest=False, override_build=downloaded_kdk) kdk_path = sys_patch_helpers.sys_patch_helpers(self.constants).determine_kdk_present(match_closest=False, override_build=downloaded_kdk)
if kdk_path is None: if kdk_path is None:
print("- Unable to find Kernel Debug Kit") print(f"- Unable to find Kernel Debug Kit: {downloaded_kdk}")
raise Exception("Unable to find Kernel Debug Kit") raise Exception("Unable to find Kernel Debug Kit")
self.kdk_path = kdk_path self.kdk_path = kdk_path
print(f"- Found KDK at: {kdk_path}") print(f"- Found KDK at: {kdk_path}")