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

ruby-changes:66915

From: Jeremy <ko1@a...>
Date: Tue, 27 Jul 2021 21:21:26 +0900 (JST)
Subject: [ruby-changes:66915] 230111802c (master): [ruby/find] Add Errno::EINVAL to list of ignored errors

https://git.ruby-lang.org/ruby.git/commit/?id=230111802c

From 230111802c2b9dcb8f391b489ff52a9dc0b41b87 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Thu, 17 Jun 2021 09:09:16 -0700
Subject: [ruby/find] Add Errno::EINVAL to list of ignored errors

This error can occur on Windows for certain filenames on certain
code pages.

Fixes [Bug #14591]

https://github.com/ruby/find/commit/0a474d1027
---
 lib/find.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/find.rb b/lib/find.rb
index 3f54cf6..9bee99c 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -49,14 +49,14 @@ module Find https://github.com/ruby/ruby/blob/trunk/lib/find.rb#L49
           yield file.dup
           begin
             s = File.lstat(file)
-          rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
+          rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG, Errno::EINVAL
             raise unless ignore_error
             next
           end
           if s.directory? then
             begin
               fs = Dir.children(file, encoding: enc)
-            rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
+            rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG, Errno::EINVAL
               raise unless ignore_error
               next
             end
-- 
cgit v1.1


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

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