diff options
Diffstat (limited to 'compat/win32/dirent.c')
| -rw-r--r-- | compat/win32/dirent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compat/win32/dirent.c b/compat/win32/dirent.c index 52420ec7d4..24ee9b814d 100644 --- a/compat/win32/dirent.c +++ b/compat/win32/dirent.c @@ -12,7 +12,10 @@ static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAW *fdata) xwcstoutf(ent->d_name, fdata->cFileName, sizeof(ent->d_name)); /* Set file type, based on WIN32_FIND_DATA */ - if (fdata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + if ((fdata->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) + && fdata->dwReserved0 == IO_REPARSE_TAG_SYMLINK) + ent->d_type = DT_LNK; + else if (fdata->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ent->d_type = DT_DIR; else ent->d_type = DT_REG; |
