Skip to content

Commit 760d7cb

Browse files
committed
Increase threshold for files per directory in editor Find in Files
This allows up to 100,000 files per folder to be searched with Find in Files, as opposed to just 1,000.
1 parent 89850d5 commit 760d7cb

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)