mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 06:30:52 +10:00
Fix copying
This commit is contained in:
+9
-5
@@ -549,13 +549,17 @@ Please build OpenCore first!"""
|
|||||||
utilities.header(["Copying OpenCore"])
|
utilities.header(["Copying OpenCore"])
|
||||||
|
|
||||||
if mount_path.exists():
|
if mount_path.exists():
|
||||||
if (mount_path / Path("EFI")).exists():
|
if (mount_path / Path("EFI/OC")).exists():
|
||||||
print("- Removing preexisting EFI folder")
|
print("- Removing preexisting EFI/OC folder")
|
||||||
shutil.rmtree(mount_path / Path("EFI"), onerror=rmtree_handler)
|
shutil.rmtree(mount_path / Path("EFI/OC"), onerror=rmtree_handler)
|
||||||
|
if (mount_path / Path("System")).exists():
|
||||||
|
print("- Removing preexisting System folder")
|
||||||
|
shutil.rmtree(mount_path / Path("System"), onerror=rmtree_handler)
|
||||||
print("- Coping OpenCore onto EFI partition")
|
print("- Coping OpenCore onto EFI partition")
|
||||||
shutil.copytree(self.constants.opencore_release_folder / Path("EFI"), mount_path / Path("EFI"))
|
shutil.copytree(self.constants.opencore_release_folder / Path("EFI/OC"), mount_path / Path("EFI/OC"))
|
||||||
|
shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System"))
|
||||||
shutil.copy(self.constants.icon_path, mount_path)
|
shutil.copy(self.constants.icon_path, mount_path)
|
||||||
print("OpenCore transfer complete")
|
print("- OpenCore transfer complete")
|
||||||
print("\nPress [Enter] to continue.\n")
|
print("\nPress [Enter] to continue.\n")
|
||||||
input()
|
input()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user