Merge pull request #51081 from SirQuartz/patch-38

Make "Find in Files" ignore directories with `.gdignore` in them
This commit is contained in:
Rémi Verschelde 2021-07-30 23:27:22 +02:00 committed by GitHub
commit bda2f915a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -228,6 +228,11 @@ void FindInFiles::_scan_dir(String path, PackedStringArray &out_folders) {
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;