ruby-changes:37941
From: nobu <ko1@a...>
Date: Thu, 19 Mar 2015 11:38:10 +0900 (JST)
Subject: [ruby-changes:37941] nobu:r50022 (trunk): win32.c: S_IFLNK
nobu 2015-03-19 11:38:02 +0900 (Thu, 19 Mar 2015) New Revision: 50022 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50022 Log: win32.c: S_IFLNK * win32/win32.c (fileattr_to_unixmode): set symlink for reparse points. Modified files: trunk/include/ruby/win32.h trunk/win32/win32.c Index: include/ruby/win32.h =================================================================== --- include/ruby/win32.h (revision 50021) +++ include/ruby/win32.h (revision 50022) @@ -439,6 +439,8 @@ __declspec(dllimport) extern int finite( https://github.com/ruby/ruby/blob/trunk/include/ruby/win32.h#L439 #define S_IXOTH 0001 #endif +#define S_IFLNK 0xa000 + /* * define this so we can do inplace editing */ Index: win32/win32.c =================================================================== --- win32/win32.c (revision 50021) +++ win32/win32.c (revision 50022) @@ -4956,6 +4956,9 @@ fileattr_to_unixmode(DWORD attr, const W https://github.com/ruby/ruby/blob/trunk/win32/win32.c#L4956 if (attr & FILE_ATTRIBUTE_DIRECTORY) { mode |= S_IFDIR | S_IEXEC; } + else if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { + mode |= S_IFLNK; + } else { mode |= S_IFREG; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/