fix: added omit for disk that have 0 total space (#2122)

This commit is contained in:
Serhiy Mytrovtsiy
2024-09-14 15:06:49 +02:00
parent f053555492
commit 57b381c11d
3 changed files with 3 additions and 2 deletions

View File

@@ -73,6 +73,7 @@ internal class CapacityReader: Reader<Disks> {
d.size = self.totalDiskSpaceInBytes(path)
}
d.smart = self.getSMARTDetails(for: BSDName)
guard d.size != 0 else { continue }
self.list.append(d)
self.list.sort()
}