fix: 概览页磁盘显示过滤 /snap (#5196)

This commit is contained in:
ssongliu 2024-05-29 14:27:11 +08:00 committed by GitHub
parent 409e90d2c5
commit 312c19e3cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -222,7 +222,10 @@ func loadDiskInfo() []dto.DiskInfo {
if len(fields) < 7 {
continue
}
if fields[1] == "tmpfs" {
if strings.HasPrefix(fields[6], "/snap") || len(strings.Split(fields[6], "/")) > 10 {
continue
}
if strings.TrimSpace(fields[1]) == "tmpfs" {
continue
}
if strings.Contains(fields[2], "K") {