From eea9cbc48e5cd392ad61844284c275e3ab1524e6 Mon Sep 17 00:00:00 2001 From: Herrtian <70463940+Herrtian@users.noreply.github.com> Date: Fri, 22 May 2026 13:29:52 +0200 Subject: [PATCH] test: avoid partial coverage in dir helper --- context.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/context.go b/context.go index 8def0461..5e49d282 100644 --- a/context.go +++ b/context.go @@ -717,7 +717,10 @@ func (c *Context) MultipartForm() (*multipart.Form, error) { func dirExists(path string) bool { info, err := os.Stat(path) - return err == nil && info.IsDir() + if err != nil { + return false + } + return info.IsDir() } // SaveUploadedFile uploads the form file to specific dst.