From fb0a5072b6498bf4297e178675e7c68bd25bc171 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 19 Jun 2015 17:52:42 -0700 Subject: [PATCH] Support for nested folder #100 Signed-off-by: Vishal Rana --- echo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/echo.go b/echo.go index 8b0c0d98..79d106b0 100644 --- a/echo.go +++ b/echo.go @@ -338,7 +338,8 @@ func serveFile(dir, file string, c *Context) error { fi, _ := f.Stat() if fi.IsDir() { - f, err = fs.Open("index.html") + file = filepath.Join(file, "index.html") + f, err = fs.Open(file) if err != nil { return NewHTTPError(http.StatusForbidden) }