mirror of
https://github.com/labstack/echo.git
synced 2024-12-22 20:06:21 +02:00
Fix serving static files on windows. See https://golang.org/pkg/net/http/#Dir.Open
This commit is contained in:
parent
770858c6e6
commit
a81670211f
3
echo.go
3
echo.go
@ -7,6 +7,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
@ -429,7 +430,7 @@ func (e *Echo) serveFile(dir, file string, c *Context) (err error) {
|
||||
d := f
|
||||
|
||||
// Index file
|
||||
file = filepath.Join(file, indexPage)
|
||||
file = path.Join(file, indexPage)
|
||||
f, err = fs.Open(file)
|
||||
if err != nil {
|
||||
if e.autoIndex {
|
||||
|
Loading…
Reference in New Issue
Block a user