From 4296856cc1cfa564289c279c86f99cc5f138ea72 Mon Sep 17 00:00:00 2001 From: Cole Lashley Date: Mon, 29 Apr 2024 12:40:36 -0700 Subject: [PATCH] Fixed separator code in config path (#616) * un quoted separator in config * addressed review comments --- wavesrv/cmd/main-server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wavesrv/cmd/main-server.go b/wavesrv/cmd/main-server.go index b4e3228d..ce1d9861 100644 --- a/wavesrv/cmd/main-server.go +++ b/wavesrv/cmd/main-server.go @@ -1180,7 +1180,7 @@ func main() { gr.HandleFunc("/api/log-active-state", AuthKeyWrap(HandleLogActiveState)) gr.HandleFunc("/api/read-file", AuthKeyWrapAllowHmac(HandleReadFile)) gr.HandleFunc("/api/write-file", AuthKeyWrap(HandleWriteFile)).Methods("POST") - configPath := filepath.Join(scbase.GetWaveHomeDir(), "config") + strconv.QuoteRune(filepath.Separator) + configPath := filepath.Join(scbase.GetWaveHomeDir(), "config") + string(filepath.Separator) log.Printf("[wave] config path: %q\n", configPath) isFileHandler := http.StripPrefix("/config/", http.FileServer(http.Dir(configPath))) isDirHandler := http.HandlerFunc(configDirHandler)