win: fix incorrect directory detection

Allow other flags too...
master
Avi Halachmi (:avih) 2015-11-08 04:28:49 +02:00
parent acbab220c8
commit ec67dc482f
1 changed files with 2 additions and 1 deletions

View File

@ -1538,7 +1538,8 @@ int is_dir(file_info_t *info)
#ifndef _WIN32
return S_ISDIR(info->st_mode);
#else
return info->dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY;
return (info->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ==
FILE_ATTRIBUTE_DIRECTORY;
#endif
}