Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gorilla-go committed Jan 29, 2024
1 parent 5f43dbd commit 7866acf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ func (r *Router) Route(path string, requestMethod string) (func(*Context), Route
filepath.Dir(realPath),
strings.TrimPrefix(path, uriPrefix),
)
_, err := os.Stat(file)
if err == nil {

if _, err := os.Stat(file); !os.IsNotExist(err) {
return func(context *Context) {
fi := NewFile(file)
f, err := os.Open(fi.FilePath)
Expand Down

0 comments on commit 7866acf

Please sign in to comment.