mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-21 18:40:16 +10:00
sys_patch.py: Ensure path is empty when moving
This commit is contained in:
@@ -368,6 +368,8 @@ class PatchSysVolume:
|
|||||||
for file in Path("/Library/Extensions").glob("*.kext"):
|
for file in Path("/Library/Extensions").glob("*.kext"):
|
||||||
if datetime.fromtimestamp(file.stat().st_mtime) < datetime(2021, 10, 1):
|
if datetime.fromtimestamp(file.stat().st_mtime) < datetime(2021, 10, 1):
|
||||||
print(f" - Relocating {file.name} kext to {relocation_path}")
|
print(f" - Relocating {file.name} kext to {relocation_path}")
|
||||||
|
if Path(relocation_path) / Path(file.name).exists():
|
||||||
|
utilities.elevated(["rm", "-Rf", relocation_path / Path(file.name)])
|
||||||
utilities.elevated(["mv", file, relocation_path])
|
utilities.elevated(["mv", file, relocation_path])
|
||||||
|
|
||||||
def write_patchset(self, patchset):
|
def write_patchset(self, patchset):
|
||||||
|
|||||||
Reference in New Issue
Block a user