summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-19 10:46:48 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-19 10:46:48 +0000
commit50fa45fb8933d752fbda5394d59a5cb63e810ae1 (patch)
tree258aabf109d0f42f69fcf706d1cc68641fe06ca3 /lib
parent04247ab5b46d713941dd092f8ef1b1c7150e5272 (diff)
* lib/fileutils.rb (FileUtils::cp_r): dup needed here; options are
destroyed otherwise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index cfca8b91ec..c65f007b8a 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -427,6 +427,8 @@ module FileUtils
fu_check_options options, OPT_TABLE['cp_r']
fu_output_message "cp -r#{options[:preserve] ? 'p' : ''}#{options[:remove_destination] ? ' --remove-destination' : ''} #{[src,dest].flatten.join ' '}" if options[:verbose]
return if options[:noop]
+ options = options.dup
+ options[:dereference_root] = true unless options.key?(:dereference_root)
fu_each_src_dest(src, dest) do |s, d|
copy_entry s, d, options[:preserve], options[:dereference_root], options[:remove_destination]
end