Skip to content

Commit

Permalink
修复判断目录是否存在的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Oct 22, 2024
1 parent e83c3d5 commit 774a840
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion file/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ func ClearFile(path string) {
// path:目录路径
func IsExists(path string) bool {
_, err := os.Stat(path)
return err == nil
return err == nil || os.IsExist(err)
}

0 comments on commit 774a840

Please sign in to comment.