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:
parent
4d5336897e
commit
9c9fe7029e
@ -660,9 +660,10 @@ pub fn executable() string {
|
|||||||
|
|
||||||
pub fn is_dir(path string) bool {
|
pub fn is_dir(path string) bool {
|
||||||
$if windows {
|
$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?
|
// 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 {
|
$else {
|
||||||
statbuf := C.stat{}
|
statbuf := C.stat{}
|
||||||
|
Loading…
Reference in New Issue
Block a user