Skip to content

Commit fb0a507

Browse files
committed
Support for nested folder #100
Signed-off-by: Vishal Rana <[email protected]>
1 parent d04651d commit fb0a507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

echo.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ func serveFile(dir, file string, c *Context) error {
338338

339339
fi, _ := f.Stat()
340340
if fi.IsDir() {
341-
f, err = fs.Open("index.html")
341+
file = filepath.Join(file, "index.html")
342+
f, err = fs.Open(file)
342343
if err != nil {
343344
return NewHTTPError(http.StatusForbidden)
344345
}

0 commit comments

Comments
 (0)