flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit e43213d25ed63fc07fd69f146e79f3360414ffeb
parent c151228b11c1cd78e406d351d08607cf02949e85
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 27 Dec 2020 15:38:00 -0800

Fix path bug

Diffstat:
Mhttp.go | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/http.go b/http.go @@ -557,11 +557,8 @@ func userFile(w http.ResponseWriter, r *http.Request) { renderedFiles := []File{} for _, file := range files { n := file.Name() - if file.IsDir() { - n += "/" - } newFile := File{ - Name: n, + Name: path.Join(p, n), // SHOULD be safe UpdatedTime: file.ModTime(), Host: c.Host, Creator: getCreator(fileName),