This commit is contained in:
f0x 2021-07-14 17:12:48 +02:00
commit 6b22779f3b
2 changed files with 5 additions and 5 deletions

View file

@ -35,7 +35,7 @@ func (fs FileSystem) Open(path string) (http.File, error) {
return nil, err
}
s, err := f.Stat()
s, _ := f.Stat()
if s.IsDir() {
index := strings.TrimSuffix(path, "/") + "/index.html"
if _, err := fs.fs.Open(index); err != nil {
@ -44,4 +44,4 @@ func (fs FileSystem) Open(path string) (http.File, error) {
}
return f, nil
}
}