all repos — flounder @ 1fd2c6df2c950ca0614ad96ba8745b6312f43927

A small site builder for the Gemini protocol

Fix index.gmi last-modified bug
alex wennerberg alex@alexwennerberg.com
Sun, 21 Feb 2021 15:56:56 -0800
commit

1fd2c6df2c950ca0614ad96ba8745b6312f43927

parent

9c90564237faf53d8ee70a963cfed465d372bdd3

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M http.gohttp.go

@@ -565,7 +565,7 @@ return

} var geminiContent string - _, err = os.Stat(path.Join(fullPath, "index.gmi")) + fullStat, err := os.Stat(path.Join(fullPath, "index.gmi")) if isDir { // redirect slash if !strings.HasSuffix(r.URL.Path, "/") {

@@ -579,6 +579,9 @@ geminiContent = generateFolderPage(fullPath)

} } else { fullPath = path.Join(fullPath, "index.gmi") + } + if fullStat != nil { + stat = fullStat // wonky } } if geminiContent == "" && os.IsNotExist(err) {