From 41a754633406574fad1e61cc507d708941bdfc01 Mon Sep 17 00:00:00 2001 From: Seednode Date: Tue, 18 Oct 2022 17:30:04 -0500 Subject: [PATCH] Hopefully fixed Windows support --- cmd/version.go | 2 +- cmd/web.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/version.go b/cmd/version.go index eb13fd5..4caf63f 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.13.3" +var Version = "0.13.4" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index 929eeab..3bbb324 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -86,7 +86,7 @@ func serveStaticFile(w http.ResponseWriter, r *http.Request, paths []string) err return err } - filePath := strings.TrimPrefix(prefixedFilePath, PREFIX) + filePath := filepath.Clean(strings.TrimPrefix(prefixedFilePath, PREFIX)) if !pathIsValid(filePath, paths) { http.NotFound(w, r)