diff --git a/main.go b/main.go index 80002ec..890efa7 100755 --- a/main.go +++ b/main.go @@ -174,7 +174,7 @@ func main() { // serve index.html if present (case-sensitive) 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) return }