mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-23 11:30:15 +10:00
installer.py: Add Permissions check
This commit is contained in:
@@ -12,6 +12,7 @@ def list_local_macOS_installers():
|
|||||||
|
|
||||||
for application in Path("/Applications").iterdir():
|
for application in Path("/Applications").iterdir():
|
||||||
# Verify whether application has createinstallmedia
|
# Verify whether application has createinstallmedia
|
||||||
|
try:
|
||||||
if (Path("/Applications") / Path(application) / Path("Contents/Resources/createinstallmedia")).exists():
|
if (Path("/Applications") / Path(application) / Path("Contents/Resources/createinstallmedia")).exists():
|
||||||
plist = plistlib.load((Path("/Applications") / Path(application) / Path("Contents/Info.plist")).open("rb"))
|
plist = plistlib.load((Path("/Applications") / Path(application) / Path("Contents/Info.plist")).open("rb"))
|
||||||
try:
|
try:
|
||||||
@@ -32,6 +33,8 @@ def list_local_macOS_installers():
|
|||||||
})
|
})
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
except PermissionError:
|
||||||
|
pass
|
||||||
return application_list
|
return application_list
|
||||||
|
|
||||||
def create_installer(installer_path, volume_name):
|
def create_installer(installer_path, volume_name):
|
||||||
|
|||||||
Reference in New Issue
Block a user