diff options
author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-25 14:28:56 +0000 |
---|---|---|
committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-04-25 14:28:56 +0000 |
commit | 1377f38c9b55c9f22647b30af22e1704c426df69 (patch) | |
tree | e4a30afddb9be295201465b4729577d25c55920e | |
parent | 2f60d0851960682ff6b552e6550ed6b0b0809b5a (diff) | |
download | ruby-1377f38c9b55c9f22647b30af22e1704c426df69.tar.gz |
* lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to
ENOTEMPTY (and ENOENT), because SUSv3 describes that "If the
directory is not an empty directory, rmdir() shall fail and set
errno to [EEXIST] or [ENOTEMPTY]" and Solaris uses EEXIST.
[Bug #9571] [ruby-dev:48017]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/fileutils.rb | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,11 @@ +Fri Apr 25 22:54:34 2014 Naohisa Goto <ngotogenome@gmail.com> + + * lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to + ENOTEMPTY (and ENOENT), because SUSv3 describes that "If the + directory is not an empty directory, rmdir() shall fail and set + errno to [EEXIST] or [ENOTEMPTY]" and Solaris uses EEXIST. + [Bug #9571] [ruby-dev:48017] + Fri Apr 25 19:16:30 2014 Tanaka Akira <akr@fsij.org> * lib/webrick/utils.rb: Don't rescue LoadError for 'etc' extension. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 0dfbf41d6c..6d1f2764fa 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -277,7 +277,7 @@ module FileUtils Dir.rmdir(dir) end end - rescue Errno::ENOTEMPTY, Errno::ENOENT + rescue Errno::ENOTEMPTY, Errno::EEXIST, Errno::ENOENT end end end |