diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-04 01:35:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-04 01:35:49 +0000 |
commit | 9cca628f857d60bea34a2ecc416a0c9693b65b8d (patch) | |
tree | ddc55810ae6793c0bba1e2ec2deee98cbf13f925 /lib | |
parent | 3a3762aaf23e01185697acea5d2d9f1f620aaf2b (diff) | |
download | ruby-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')
-rw-r--r-- | lib/fileutils.rb | 1 |
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 |