mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: string fixes, is_dir fix
This commit is contained in:
@ -935,7 +935,8 @@ pub fn is_dir(path string) bool {
|
||||
return false
|
||||
}
|
||||
// ref: https://code.woboq.org/gcc/include/sys/stat.h.html
|
||||
return int(statbuf.st_mode) & S_IFMT == S_IFDIR
|
||||
val:= int(statbuf.st_mode) & S_IFMT
|
||||
return val == S_IFDIR
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user