Make "Find in Files" searches ignore directories with .gdignore files 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 658b152bd8)
This commit is contained in:
Nicholas Huelin 2021-07-30 15:10:05 -04:00 committed by Rémi Verschelde
parent 121af4a37d
commit f84de49718
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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;