diff options
Diffstat (limited to 'lib/find.rb')
-rw-r--r-- | lib/find.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/find.rb b/lib/find.rb index 3f54cf6b93..98a79cc76d 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -27,6 +27,8 @@ # module Find + VERSION = "0.2.0" + # # Calls the associated block with the name of every file and directory listed # as arguments, then recursively on their subdirectories, and so on. @@ -49,14 +51,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 |