Skip to content

Commit

Permalink
Make "Find in Files" searches ignore directories with .gdignore fil…
Browse files Browse the repository at this point in the history
…es in them

This pull request fixes an issue where searches using the "Find in Files" function would include folders with `.gdignore` files in them. The editor is supposed to ignore directories with these files in them altogether.

(cherry picked from commit 658b152)
  • Loading branch information
SirQuartz authored and akien-mga committed Aug 3, 2021
1 parent 121af4a commit f84de49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/find_in_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ void FindInFiles::_scan_dir(String path, PoolStringArray &out_folders) {
if (file == "")
break;

// If there is a .gdignore file in the directory, don't bother searching it
if (file == ".gdignore") {
break;
}

// Ignore special dirs (such as .git and .import)
if (file == "." || file == ".." || file.begins_with("."))
continue;
Expand Down

0 comments on commit f84de49

Please sign in to comment.