Permalink
Browse files

rbinstall.rb: skip symlinks

* tool/rbinstall.rb (install_recursive): skip symlinks, which are made
  by `make runnable'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
nobu committed Sep 4, 2012
1 parent 1ff165c commit 7d79f355fcfb39c52f5b47f44c99c0e645d1878a
Showing with 3 additions and 1 deletion.
  1. +3 −1 tool/rbinstall.rb
View
@@ -227,9 +227,11 @@ def install_recursive(srcdir, dest, options = {})
Dir.foreach(file) do |f|
src = File.join(file, f)
d = File.join(dest, dir = src[subpath])
- stat = File.stat(src) rescue next
+ stat = File.lstat(src) rescue next
if stat.directory?
files << [src, d, true] if /\A\./ !~ f and !prune[dir]
+ elsif stat.symlink?
+ # skip
else
files << [src, d, false] if File.fnmatch?(glob, f) and !skip[f]
end

0 comments on commit 7d79f35

Please sign in to comment.