mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/fileutils.rb: rm_r should raise Errno::ENOENT if file not exist. [ruby-core:958] Thanks Johan Holmberg.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
93db1877cf
commit
cd74de7314
2 changed files with 6 additions and 0 deletions
|
@ -520,6 +520,7 @@ module FileUtils
|
|||
st = File.lstat(fname)
|
||||
rescue
|
||||
next if force
|
||||
raise
|
||||
end
|
||||
if st.symlink? then remove_file fname, force
|
||||
elsif st.directory? then remove_dir fname, force
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue