Ver Fonte

Merge pull request #51081 from SirQuartz/patch-38

Make "Find in Files" ignore directories with `.gdignore` in them
Rémi Verschelde há 4 anos atrás
pai
commit
bda2f915a8
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      editor/find_in_files.cpp

+ 5 - 0
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;