From 1377f38c9b55c9f22647b30af22e1704c426df69 Mon Sep 17 00:00:00 2001 From: ngoto Date: Fri, 25 Apr 2014 14:28:56 +0000 Subject: * 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 --- ChangeLog | 8 ++++++++ lib/fileutils.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6ef301de82..50650a4347 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Apr 25 22:54:34 2014 Naohisa Goto + + * 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 * 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 -- cgit v1.2.3