From 961ffb1868a5c2b09ed90b21c9c72bd656b814c1 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 16 Jul 2019 03:17:49 +0200 Subject: [PATCH] Windows: temporary fix of dir_exists --- vlib/os/os.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index 2796b6f44e..8d0a8666c5 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -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())