[前][次][番号順一覧][スレッド一覧]

ruby-changes:33639

From: ngoto <ko1@a...>
Date: Fri, 25 Apr 2014 23:29:01 +0900 (JST)
Subject: [ruby-changes:33639] ngoto:r45720 (trunk): * lib/fileutils.rb (rmdir): rescue Errno::EEXIST in addition to

ngoto	2014-04-25 23:28:56 +0900 (Fri, 25 Apr 2014)

  New Revision: 45720

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45720

  Log:
    * 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]

  Modified files:
    trunk/ChangeLog
    trunk/lib/fileutils.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45719)
+++ ChangeLog	(revision 45720)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 25 22:54:34 2014  Naohisa Goto  <ngotogenome@g...>
+
+	* 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@f...>
 
 	* lib/webrick/utils.rb: Don't rescue LoadError for 'etc' extension.
Index: lib/fileutils.rb
===================================================================
--- lib/fileutils.rb	(revision 45719)
+++ lib/fileutils.rb	(revision 45720)
@@ -277,7 +277,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L277
             Dir.rmdir(dir)
           end
         end
-      rescue Errno::ENOTEMPTY, Errno::ENOENT
+      rescue Errno::ENOTEMPTY, Errno::EEXIST, Errno::ENOENT
       end
     end
   end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]