Skip to content

Commit f9eb81e

Browse files
committed
Merge pull request godotengine#91338 from Calinou/find-in-files-increase-file-threshold
Increase threshold for files per directory in editor Find in Files
2 parents 0494b37 + 760d7cb commit f9eb81e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editor/find_in_files.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ void FindInFiles::_scan_dir(const String &path, PackedStringArray &out_folders,
222222

223223
dir->list_dir_begin();
224224

225-
for (int i = 0; i < 1000; ++i) {
225+
// Limit to 100,000 iterations to avoid an infinite loop just in case
226+
// (this technically limits results to 100,000 files per folder).
227+
for (int i = 0; i < 100'000; ++i) {
226228
String file = dir->get_next();
227229

228230
if (file.is_empty()) {

0 commit comments

Comments
 (0)