From 410d236f89a6192947b73333c7dbb7252d8f299a Mon Sep 17 00:00:00 2001 From: henrygd Date: Sat, 5 Apr 2025 17:57:04 -0400 Subject: [PATCH] fix EXTRA_FILESYSTEMS for windows (#422) Co-authored-by: coosir --- beszel/internal/agent/disk.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/beszel/internal/agent/disk.go b/beszel/internal/agent/disk.go index cebdfa8..c9b2dd6 100644 --- a/beszel/internal/agent/disk.go +++ b/beszel/internal/agent/disk.go @@ -5,6 +5,7 @@ import ( "log/slog" "os" "path/filepath" + "runtime" "strings" "time" @@ -36,7 +37,12 @@ func (a *Agent) initializeDiskInfo() { // Helper function to add a filesystem to fsStats if it doesn't exist addFsStat := func(device, mountpoint string, root bool) { - key := filepath.Base(device) + var key string + if runtime.GOOS == "windows" { + key = device + } else { + key = filepath.Base(device) + } var ioMatch bool if _, exists := a.fsStats[key]; !exists { if root {