Get correct size for child dev under macOS
This commit is contained in:
parent
a4ee7b890c
commit
20fe08dbb4
1 changed files with 7 additions and 0 deletions
|
|
@ -683,6 +683,13 @@ def get_disk_details_macos(path):
|
|||
else:
|
||||
dev['parent'] = dev.pop('ParentWholeDisk', None)
|
||||
|
||||
# Fix details if main dev is a child
|
||||
for child in details['children']:
|
||||
if path == child['path']:
|
||||
for key in ('fstype', 'label', 'name', 'size'):
|
||||
details[key] = child[key]
|
||||
break
|
||||
|
||||
# Done
|
||||
return details
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue