mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
installer.py: Use Copy on Write for tmp
Credit to @flagersgit for suggestion
This commit is contained in:
@@ -354,8 +354,8 @@ def generate_installer_creation_script(tmp_location, installer_path, disk):
|
||||
if (Path(file) / Path("Contents/Resources/createinstallmedia")).exists():
|
||||
subprocess.run(["rm", "-rf", file])
|
||||
|
||||
# Copy installer to tmp
|
||||
subprocess.run(["cp", "-R", installer_path, tmp_location])
|
||||
# Copy installer to tmp (use CoW to avoid extra disk writes)
|
||||
subprocess.run(["cp", "-cR", installer_path, tmp_location])
|
||||
|
||||
# Adjust installer_path to point to the copied installer
|
||||
installer_path = Path(tmp_location) / Path(Path(installer_path).name)
|
||||
|
||||
Reference in New Issue
Block a user