1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-10-27 07:35:41 -07:00
parent 8067b8eaf7
commit 7bd314557b

View File

@ -445,11 +445,12 @@ func (c *context) File(file string) error {
fi, _ := f.Stat()
if fi.IsDir() {
file = filepath.Join(file, "index.html")
file = filepath.Join(file, indexPage)
f, err = os.Open(file)
if err != nil {
return ErrNotFound
}
defer f.Close()
if fi, err = f.Stat(); err != nil {
return err
}