Windows: temporary fix of dir_exists

pull/1174/head
Alexander Medvednikov 2019-07-16 03:17:49 +02:00
parent 48d5650765
commit 961ffb1868
1 changed files with 3 additions and 2 deletions

View File

@ -320,8 +320,9 @@ pub fn file_exists(path string) bool {
pub fn dir_exists(path string) bool { pub fn dir_exists(path string) bool {
$if windows { $if windows {
attr := int(C.GetFileAttributes(path.cstr())) return file_exists(path)
return attr == FILE_ATTRIBUTE_DIRECTORY //attr := int(C.GetFileAttributes(path.cstr()))
//return attr & FILE_ATTRIBUTE_DIRECTORY
} }
$else { $else {
dir := C.opendir(path.cstr()) dir := C.opendir(path.cstr())