diff --git a/CHANGELOG.md b/CHANGELOG.md index 858e34ed7..213c7e3e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Move images to `docs/images` - Payloads: - Remove redundant/unused files bundled in payloads.dmg +- Resolve unpatching Nvidia Web Drivers failing to clean up `/Library/Extensions` ## 1.4.3 - Update non-Metal Binaries for macOS Sonoma: diff --git a/opencore_legacy_patcher/sys_patch/sys_patch.py b/opencore_legacy_patcher/sys_patch/sys_patch.py index f701c28be..254169cd5 100644 --- a/opencore_legacy_patcher/sys_patch/sys_patch.py +++ b/opencore_legacy_patcher/sys_patch/sys_patch.py @@ -511,15 +511,16 @@ class PatchSysVolume: for key in oclp_plist_data: if isinstance(oclp_plist_data[key], (bool, int)): continue - if "Install" not in oclp_plist_data[key]: - continue - for location in oclp_plist_data[key]["Install"]: - if not location.endswith("Extensions"): + for install_type in ["Install", "Install Non-Root"]: + if install_type not in oclp_plist_data[key]: continue - for file in oclp_plist_data[key]["Install"][location]: - if not file.endswith(".kext"): + for location in oclp_plist_data[key][install_type]: + if not location.endswith("Extensions"): continue - self._remove_file("/Library/Extensions", file) + for file in oclp_plist_data[key][install_type][location]: + if not file.endswith(".kext"): + continue + self._remove_file("/Library/Extensions", file) # Handle situations where users migrated from older OSes with a lot of garbage in /L*/E* # ex. Nvidia Web Drivers, NetUSB, dosdude1's patches, etc.