diff options
author | Jeremy Evans <[email protected]> | 2021-06-17 09:09:16 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-07-27 21:20:31 +0900 |
commit | 230111802c2b9dcb8f391b489ff52a9dc0b41b87 (patch) | |
tree | 49f10ffe43c3b0a9323e64e37086a56f011059eb | |
parent | acfec23becaa15936a00305f5742e74012b33e82 (diff) |
[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
-rw-r--r-- | lib/find.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb index 3f54cf6b93..9bee99c66d 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -49,14 +49,14 @@ module Find 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 |