From 3825f5837eb9b3a0fc2e246e7b9b0d710cbee8f1 Mon Sep 17 00:00:00 2001 From: phith0n Date: Tue, 2 Feb 2021 00:57:20 +0800 Subject: [PATCH] fix #4596 Signed-off-by: phith0n --- web/ui/ui.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/ui/ui.go b/web/ui/ui.go index 4aa39734b..9ee457801 100644 --- a/web/ui/ui.go +++ b/web/ui/ui.go @@ -19,6 +19,7 @@ import ( "net/http" "os" "path" + "path/filepath" "strings" "github.com/shurcooL/httpfs/filter" @@ -32,7 +33,7 @@ var Assets = func() http.FileSystem { panic(err) } var assetsPrefix string - switch path.Base(wd) { + switch filepath.Base(wd) { case "prometheus": // When running Prometheus (without built-in assets) from the repo root. assetsPrefix = "./web/ui"