Skip to content

Commit

Permalink
Now possible to ignore file hierarchies.
Browse files Browse the repository at this point in the history
For example, if there's a tmp/ directory with 100k subdirectories,
scanning can be made a lot faster by ignoring "*/tmp".
  • Loading branch information
Otto Hilska committed Dec 4, 2009
1 parent f645ace commit f83cbc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fuzzy_file_finder.rb
Expand Up @@ -217,6 +217,7 @@ def inspect #:nodoc:
def follow_tree(directory)
Dir.entries(directory.name).each do |entry|
next if entry[0,1] == "."
next if ignore?(directory.name) # Ignore whole directory hierarchies
raise TooManyEntries if files.length > ceiling

full = File.join(directory.name, entry)
Expand Down

0 comments on commit f83cbc6

Please sign in to comment.