From c7837ed8d3ec3a74382927df7c2fae19862b78ea Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 17 Mar 2011 23:48:13 +0000 Subject: * lib/fileutils.rb (FileUtils::Entry_#copy_file): updated FileUtils.cp to still copy file permissions when :preserve is false (as cp does this even when -p isn't set). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/fileutils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 9cd1a7cc76..f2a61970b4 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1276,7 +1276,7 @@ module FileUtils def copy_file(dest) File.open(path()) do |s| - File.open(dest, 'wb') do |f| + File.open(dest, 'wb', s.stat.mode) do |f| IO.copy_stream(s, f) end end -- cgit v1.2.3