Compare commits

...

3 commits

View file

@ -174,7 +174,7 @@ func main() {
// serve index.html if present (case-sensitive) // serve index.html if present (case-sensitive)
indexPath := filepath.Join(fpath, "index.html") indexPath := filepath.Join(fpath, "index.html")
if _, err := os.Stat(indexPath); err == nil { if indexInfo, err := os.Stat(indexPath); err == nil && !indexInfo.IsDir() {
http.ServeFile(w, r, indexPath) http.ServeFile(w, r, indexPath)
return return
} }