1
0
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:
Oleg Lobanov 2016-01-26 22:03:01 +04:00
parent 770858c6e6
commit a81670211f

View File

@ -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 {