From 0065861eabde6c29b48ee9719b8333b3cc90348a Mon Sep 17 00:00:00 2001 From: zaire Date: Mon, 16 Mar 2026 22:44:21 +0100 Subject: [PATCH 1/2] fixed serving of directory named 'index.html' --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 80002ec..78c8271 100755 --- a/main.go +++ b/main.go @@ -173,8 +173,8 @@ func main() { } // serve index.html if present (case-sensitive) - indexPath := filepath.Join(fpath, "index.html") - if _, err := os.Stat(indexPath); err == nil { + indexPath := fpath + "/index.html" + if indexInfo, err := os.Stat(indexPath); err == nil && !indexInfo.IsDir() { http.ServeFile(w, r, indexPath) return } From eb7b1cf026ae91d3e22d4e9a0da7a9de3bc14b63 Mon Sep 17 00:00:00 2001 From: supitszaire Date: Mon, 16 Mar 2026 22:52:14 +0100 Subject: [PATCH 2/2] platform agnostic change --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 78c8271..890efa7 100755 --- a/main.go +++ b/main.go @@ -173,7 +173,7 @@ func main() { } // serve index.html if present (case-sensitive) - indexPath := fpath + "/index.html" + indexPath := filepath.Join(fpath, "index.html") if indexInfo, err := os.Stat(indexPath); err == nil && !indexInfo.IsDir() { http.ServeFile(w, r, indexPath) return