mirror of
https://git.sr.ht/~adnano/go-gemini
synced 2024-11-26 10:23:45 +01:00
fs: Fix empty media type for directory index pages
This commit is contained in:
parent
dfe8446d49
commit
21845ca419
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