diff options
-rw-r--r-- | include/ruby/win32.h | 2 | ||||
-rw-r--r-- | win32/win32.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 4b938626af..eaf7363237 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -439,6 +439,8 @@ __declspec(dllimport) extern int finite(double); #define S_IXOTH 0001 #endif +#define S_IFLNK 0xa000 + /* * define this so we can do inplace editing */ diff --git a/win32/win32.c b/win32/win32.c index a5e182b449..012a9a37a5 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4956,6 +4956,9 @@ fileattr_to_unixmode(DWORD attr, const WCHAR *path) if (attr & FILE_ATTRIBUTE_DIRECTORY) { mode |= S_IFDIR | S_IEXEC; } + else if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { + mode |= S_IFLNK; + } else { mode |= S_IFREG; } |