summaryrefslogtreecommitdiff
path: root/compat/win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'compat/win32.h')
-rw-r--r--compat/win32.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/compat/win32.h b/compat/win32.h
index a97e880757..671bcc81f9 100644
--- a/compat/win32.h
+++ b/compat/win32.h
@@ -6,10 +6,12 @@
#include <windows.h>
#endif
-static inline int file_attr_to_st_mode (DWORD attr)
+static inline int file_attr_to_st_mode (DWORD attr, DWORD tag)
{
int fMode = S_IREAD;
- if (attr & FILE_ATTRIBUTE_DIRECTORY)
+ if ((attr & FILE_ATTRIBUTE_REPARSE_POINT) && tag == IO_REPARSE_TAG_SYMLINK)
+ fMode |= S_IFLNK;
+ else if (attr & FILE_ATTRIBUTE_DIRECTORY)
fMode |= S_IFDIR;
else
fMode |= S_IFREG;