From 312c19e3ccf248a2ef29c5ac1ae17f6ecefa00a2 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Wed, 29 May 2024 14:27:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A6=82=E8=A7=88=E9=A1=B5=E7=A3=81?= =?UTF-8?q?=E7=9B=98=E6=98=BE=E7=A4=BA=E8=BF=87=E6=BB=A4=20/snap=20(#5196)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/dashboard.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/app/service/dashboard.go b/backend/app/service/dashboard.go index 478f8811a..298a5947d 100644 --- a/backend/app/service/dashboard.go +++ b/backend/app/service/dashboard.go @@ -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") {