Merge branch 'main' of https://codeberg.org/supitszaire/indir
This commit is contained in:
commit
cc05d3b2d3
2 changed files with 12 additions and 2 deletions
2
main.go
2
main.go
|
|
@ -175,7 +175,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue