mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-06 12:08:20 +08:00
test: avoid partial coverage in dir helper
This commit is contained in:
parent
ca0bc54ee1
commit
eea9cbc48e
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user