aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-04 01:35:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-04 01:35:49 +0000
commit9cca628f857d60bea34a2ecc416a0c9693b65b8d (patch)
treeddc55810ae6793c0bba1e2ec2deee98cbf13f925 /lib/fileutils.rb
parent3a3762aaf23e01185697acea5d2d9f1f620aaf2b (diff)
downloadruby-9cca628f857d60bea34a2ecc416a0c9693b65b8d.tar.gz
fileutils.rb: fix error for non-existent entry
* lib/fileutils.rb (FileUtils::Entry_#copy): ensure that the source entry exists first, to fix error for non-existent entry. [ruby-core:77885] [Bug #12892] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 4317af5327..efceb2fba7 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -1244,6 +1244,7 @@ module FileUtils
end
def copy(dest)
+ lstat
case
when file?
copy_file dest