Skip to content

Commit

Permalink
* lib/fileutils.rb (FileUtils::cp_r): dup needed here; options are
Browse files Browse the repository at this point in the history
	  destroyed otherwise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
shyouhei committed Apr 19, 2010
1 parent 04247ab commit 50fa45f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Mon Apr 19 19:41:10 2010 URABE Shyouhei <[email protected]>

* lib/fileutils.rb (FileUtils::cp_r): backport r11156 from ruby_1_8.

Mon Apr 19 19:18:53 2010 Nobuyoshi Nakada <[email protected]>

* parse.y (parser_yylex): reduced duplicated conditions.
Expand Down
2 changes: 2 additions & 0 deletions lib/fileutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ def cp_r(src, dest, options = {})
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
Expand Down

0 comments on commit 50fa45f

Please sign in to comment.