1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-16 20:29:10 +00:00

Fix disk space check size error

This commit is contained in:
Tw93
2025-11-22 13:32:32 +08:00
parent df66b69329
commit c3edf3c625
3 changed files with 7 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -453,6 +453,10 @@ func collectDisks() ([]DiskStatus, error) {
if strings.HasPrefix(part.Mountpoint, "/System/Volumes/") { if strings.HasPrefix(part.Mountpoint, "/System/Volumes/") {
continue continue
} }
// Skip private volumes
if strings.HasPrefix(part.Mountpoint, "/private/") {
continue
}
if seenDevice[part.Device] { if seenDevice[part.Device] {
continue continue
} }
@@ -464,7 +468,9 @@ func collectDisks() ([]DiskStatus, error) {
if usage.Total < 1<<30 { if usage.Total < 1<<30 {
continue continue
} }
volKey := fmt.Sprintf("%s:%d", part.Fstype, usage.Total>>30) // For APFS volumes, use a more precise dedup key (bytes level)
// to handle shared storage pools properly
volKey := fmt.Sprintf("%s:%d", part.Fstype, usage.Total)
if seenVolume[volKey] { if seenVolume[volKey] {
continue continue
} }