mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Windows: temporary fix of dir_exists
This commit is contained in:
parent
48d5650765
commit
961ffb1868
@ -320,8 +320,9 @@ pub fn file_exists(path string) bool {
|
||||
|
||||
pub fn dir_exists(path string) bool {
|
||||
$if windows {
|
||||
attr := int(C.GetFileAttributes(path.cstr()))
|
||||
return attr == FILE_ATTRIBUTE_DIRECTORY
|
||||
return file_exists(path)
|
||||
//attr := int(C.GetFileAttributes(path.cstr()))
|
||||
//return attr & FILE_ATTRIBUTE_DIRECTORY
|
||||
}
|
||||
$else {
|
||||
dir := C.opendir(path.cstr())
|
||||
|
Loading…
Reference in New Issue
Block a user