summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fileutils.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 2a6b248585..58e3f1d684 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1261,8 +1261,10 @@ module FileUtils
end
def copy_file(dest)
- File.open(dest, 'wb') do |f|
- IO.copy_stream(path(), f)
+ File.open(path()) do |s|
+ File.open(dest, 'wb') do |f|
+ IO.copy_stream(s, f)
+ end
end
end