kdk_handler: Verify path before iterating over

This commit is contained in:
Mykola Grymalyuk
2022-09-30 11:18:11 -06:00
parent 7e006e8722
commit 9c18b15153
2 changed files with 7 additions and 5 deletions
+5 -4
View File
@@ -170,8 +170,9 @@ class kernel_debug_kit_handler:
return False, error_msg
def is_kdk_installed(self, build):
for file in Path("/Library/Developer/KDKs").iterdir():
if file.is_dir():
if build in file.name:
return True
if Path("/Library/Developer/KDKs").exists():
for file in Path("/Library/Developer/KDKs").iterdir():
if file.is_dir():
if build in file.name:
return True
return False