🎨 判断目录

This commit is contained in:
Liang Ding 2019-05-24 11:43:26 +08:00
parent 879b3d78c3
commit 17e59cf55a
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
1 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,10 @@ func (*myfile) IsImg(extension string) bool {
// IsDir determines whether the specified path is a directory.
func (*myfile) IsDir(path string) bool {
fio, err := os.Lstat(path)
if os.IsNotExist(err) {
return false
}
if nil != err {
fileLogger.Warnf("Determines whether [%s] is a directory failed: [%v]", path, err)