mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-14 15:11:18 +08:00
test: avoid partial coverage in dir helper
This commit is contained in:
parent
0538db2590
commit
880ef9d904
@ -717,7 +717,10 @@ func (c *Context) MultipartForm() (*multipart.Form, error) {
|
|||||||
|
|
||||||
func dirExists(path string) bool {
|
func dirExists(path string) bool {
|
||||||
info, err := os.Stat(path)
|
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.
|
// SaveUploadedFile uploads the form file to specific dst.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user