mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: added check if the disk has valid UUID, if not - use disk BSDName instead (#2262)
This commit is contained in:
@@ -328,6 +328,9 @@ private func driveDetails(_ disk: DADisk, removableState: Bool) -> drive? {
|
||||
if d.path == nil {
|
||||
return nil
|
||||
}
|
||||
if d.uuid == "" || d.uuid == "00000000-0000-0000-0000-000000000000" {
|
||||
d.uuid = d.BSDName
|
||||
}
|
||||
|
||||
let partitionLevel = d.BSDName.filter { "0"..."9" ~= $0 }.count
|
||||
if let parent = getDeviceIOParent(DADiskCopyIOMedia(disk), level: Int(partitionLevel)) {
|
||||
|
||||
Reference in New Issue
Block a user