From 9097d4257db884368ede19d92e6f91688167c293 Mon Sep 17 00:00:00 2001 From: Tueem Date: Tue, 26 May 2026 02:05:26 +0200 Subject: [PATCH] fix(download): use path instead of filepath --- internal/routes/download.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/routes/download.go b/internal/routes/download.go index 9235603..cd26063 100644 --- a/internal/routes/download.go +++ b/internal/routes/download.go @@ -5,7 +5,7 @@ import ( "log" "net/http" "net/url" - "path/filepath" + "path" "strconv" "tomatentum.net/svg-templater/pkg/format" @@ -92,10 +92,10 @@ func DownloadSVG(w http.ResponseWriter, r *http.Request) { w.Write(json) } -func getPublicUrl(r *http.Request, path string) string { +func getPublicUrl(r *http.Request, subpath string) string { newURL := url.URL{ Host: r.Host, - Path: filepath.Join("public", path), + Path: path.Join("public", subpath), } newURL.Scheme = "http" if r.TLS != nil {