From 974ce05088609bb521a6cd952c235e244b8fc306 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Wed, 4 May 2022 21:24:50 -0600 Subject: [PATCH] Work around payload write error with Auto Patcher --- resources/main.py | 2 +- resources/sys_patch.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/main.py b/resources/main.py index 2a5362072..09cb0c99c 100644 --- a/resources/main.py +++ b/resources/main.py @@ -45,7 +45,7 @@ class OpenCoreLegacyPatcher: print("- Detected arguments, switching to CLI mode") self.constants.gui_mode = True # Assumes no user interaction is required self.constants.current_path = Path.cwd() - if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): + if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS") and "--auto_patch" not in sys.argv: print("- Rerouting payloads location") self.constants.payload_path = sys._MEIPASS / Path("payloads") arguments.arguments().parse_arguments(self.constants) diff --git a/resources/sys_patch.py b/resources/sys_patch.py index 94eebae2e..6258e0fb0 100644 --- a/resources/sys_patch.py +++ b/resources/sys_patch.py @@ -165,7 +165,7 @@ class PatchSysVolume: utilities.process_status(utilities.elevated(["mkdir", f"{self.mount_application_support}/SkyLightPlugins"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) else: print("- Creating SkylightPlugins folder") - utilities.process_status(utilities.elevated(["mkdir", f"{self.mount_application_support}/SkyLightPlugins/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) + utilities.process_status(utilities.elevated(["mkdir", "-p", f"{self.mount_application_support}/SkyLightPlugins/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)) def patch_root_vol(self):