Fix index.gmi last-modified bug
alex wennerberg alex@alexwennerberg.com
Sun, 21 Feb 2021 15:56:56 -0800
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
http.go
→
http.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) {