mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
utilities.py: Fix volume size detection
This commit is contained in:
@@ -422,9 +422,19 @@ def find_disk_off_uuid(uuid):
|
||||
return None
|
||||
|
||||
def get_free_space(disk=None):
|
||||
"""
|
||||
Get free space on disk in bytes
|
||||
|
||||
Parameters:
|
||||
disk (str): Path to mounted disk (or folder on disk)
|
||||
|
||||
Returns:
|
||||
int: Free space in bytes
|
||||
"""
|
||||
if disk is None:
|
||||
disk = "/"
|
||||
total, used, free = shutil.disk_usage("/")
|
||||
|
||||
total, used, free = shutil.disk_usage(disk)
|
||||
return free
|
||||
|
||||
def grab_mount_point_from_disk(disk):
|
||||
|
||||
Reference in New Issue
Block a user