From 04a1cff37e7b85ada3c79c8a6f780504420213d8 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:14:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=A6=82=E8=A7=88?= =?UTF-8?q?=E9=A1=B5=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99=20500=20=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#606)?= 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 49a67ec7e..69a0fb9b1 100644 --- a/backend/app/service/dashboard.go +++ b/backend/app/service/dashboard.go @@ -186,7 +186,10 @@ func loadDiskInfo() []dto.DiskInfo { } for i := 0; i < len(mounts); i++ { - state, _ := disk.Usage(mounts[i].Mount) + state, err := disk.Usage(mounts[i].Mount) + if err != nil { + continue + } var itemData dto.DiskInfo itemData.Path = mounts[i].Mount itemData.Type = mounts[i].Type