test: avoid partial coverage in dir helper

This commit is contained in:
Herrtian 2026-05-22 13:29:52 +02:00
parent ca0bc54ee1
commit eea9cbc48e

View File

@ -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.