lib/file/find.rb in file-find-0.4.2 vs lib/file/find.rb in file-find-0.4.3
- old
+ new
@@ -7,11 +7,11 @@
# Do nothing, not required, just nicer.
end
class File::Find
# The version of the file-find library
- VERSION = '0.4.2'.freeze
+ VERSION = '0.4.3'.freeze
# :stopdoc:
VALID_OPTIONS = %w[
atime
ctime
@@ -233,11 +233,13 @@
begin
stat_info = File.send(stat_method, file)
rescue Errno::ENOENT, Errno::EACCES
next
rescue Errno::ELOOP
- stat_method = :lstat # Handle recursive symlinks
- retry if stat_method.to_s != 'lstat'
+ if stat_method.to_s != 'lstat'
+ stat_method = :lstat # Handle recursive symlinks
+ retry
+ end
end
# We need to escape any brackets in the directory name.
glob = File.join(File.dirname(file).gsub(/([\[\]])/,'\\\\\1'), @name)