1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-23 21:29:26 +02:00

fixing windows issue with static paths

This commit is contained in:
Chase Hutchins 2015-06-24 21:20:46 -07:00
parent 356909c49e
commit 3e7a66392e

@ -8,6 +8,7 @@ import (
"io"
"log"
"net/http"
"path"
"reflect"
"runtime"
"strings"
@ -339,7 +340,7 @@ func serveFile(dir, file string, c *Context) error {
fi, _ := f.Stat()
if fi.IsDir() {
file = filepath.Join(file, "index.html")
file = path.Join(file, "index.html")
f, err = fs.Open(file)
if err != nil {
return NewHTTPError(http.StatusForbidden)