1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fix os.is_dir on Windows

This commit is contained in:
Alexander Medvednikov 2019-07-21 17:14:25 +02:00
parent 4d5336897e
commit 9c9fe7029e

View File

@ -660,9 +660,10 @@ pub fn executable() string {
pub fn is_dir(path string) bool {
$if windows {
val := int(C.GetFileAttributes(path.to_wide()))
return dir_exists(path)
//val := int(C.GetFileAttributes(path.to_wide()))
// Note: this return is broke (wrong). we have dir_exists already how will this differ?
return (val &FILE_ATTRIBUTE_DIRECTORY) > 0
//return (val &FILE_ATTRIBUTE_DIRECTORY) > 0
}
$else {
statbuf := C.stat{}