summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-30 23:27:22 +0200
committerGitHub <noreply@github.com>2021-07-30 23:27:22 +0200
commitbda2f915a822aebfc9101e9b53c56bd2e8dace3f (patch)
tree924fee457d57def4443e3463099c879fafd9f304
parent5a30ba7a66b32577e5b7d4a19e7fe5fbdad572e9 (diff)
parent658b152bd8f546dfb0fe54d4dce49d9e5f87ce8c (diff)
Merge pull request #51081 from SirQuartz/patch-38
Make "Find in Files" ignore directories with `.gdignore` in them
-rw-r--r--editor/find_in_files.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 87277e79f3..9444706fd2 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -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;