renamed camel case index file names

This commit is contained in:
Martin Riedl 2024-07-02 01:26:21 +02:00
parent a6d67cf60a
commit ff36e5eb1d
Signed by: martinr92
GPG key ID: FB68DA65516A804C

4
fs.go
View file

@ -33,7 +33,7 @@ type FS struct {
UseLocalFolder bool
LocalFolderPrefix string
HeaderHandler HeaderHandler
IndexFilenames []string
IndexFileNames []string
}
// NewFS creates a new instance of the http file system used for serving static files.
@ -109,7 +109,7 @@ func (fs *FS) checkFolder(file fs.File, url string) (fs.File, bool) {
_ = file.Close()
// check for index files
for _, indexFileName := range fs.IndexFilenames {
for _, indexFileName := range fs.IndexFileNames {
newFullPath := path.Join(url, indexFileName)
if newFile, err := fs.findFile(newFullPath); err == nil {
return newFile, true