From 635b5da0768d912a7ddf8a3f1ddc6bb8f8865a45 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Mon, 1 Jan 2024 16:27:57 +0100 Subject: Fix paths when downloading selection --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 826f624..18ae048 100644 --- a/main.go +++ b/main.go @@ -541,7 +541,8 @@ func download(w http.ResponseWriter, r *http.Request) { sendError(w, r, err.Error(), http.StatusInternalServerError) return } - f, err := os.Open(sel) + filePath := filepath.Join(baseDocDir, username, filepath.Base(sel)) + f, err := os.Open(filePath) if err != nil { sendError(w, r, err.Error(), http.StatusInternalServerError) return -- cgit v1.2.3