fs: Fix empty media type for directory index pages
This commit is contained in:
parent
fffe86680e
commit
a40b5dcd0b
3
fs.go
3
fs.go
@ -151,7 +151,8 @@ func serveFile(w ResponseWriter, r *Request, fsys fs.FS, name string, redirect b
|
||||
}
|
||||
|
||||
// Use contents of index.gmi if present
|
||||
index, err := fsys.Open(path.Join(name, indexPage))
|
||||
name = path.Join(name, indexPage)
|
||||
index, err := fsys.Open(name)
|
||||
if err == nil {
|
||||
defer index.Close()
|
||||
istat, err := index.Stat()
|
||||
|
Loading…
Reference in New Issue
Block a user