mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
- remove disk from the list if does not have path (prevent to show MacintoshHD - Data partition) (#180)
This commit is contained in:
@@ -135,10 +135,12 @@ internal class CapacityReader: Reader<DiskList> {
|
||||
}
|
||||
}
|
||||
|
||||
if d.path != nil {
|
||||
d.free = freeDiskSpaceInBytes(d.path!.absoluteString)
|
||||
if d.path == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
d.free = freeDiskSpaceInBytes(d.path!.absoluteString)
|
||||
|
||||
let partitionLevel = d.BSDName.filter { "0"..."9" ~= $0 }.count
|
||||
if let parent = self.getDeviceIOParent(DADiskCopyIOMedia(disk), level: Int(partitionLevel)) {
|
||||
d.parent = parent
|
||||
|
||||
Reference in New Issue
Block a user