diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-19 02:38:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-19 02:38:02 +0000 |
commit | 5155a402abc54f260e49228f7ded5408444cbe0e (patch) | |
tree | e4bf7dbfa0fd80e9b756c0195505fbfe75c7697a | |
parent | e2853f5d815fe341b540a4aa8a3ab0dea1c9290c (diff) | |
download | ruby-5155a402abc54f260e49228f7ded5408444cbe0e.tar.gz |
win32.c: S_IFLNK
* win32/win32.c (fileattr_to_unixmode): set symlink for reparse
points.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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; } |