Skip to content

Commit

Permalink
Merge pull request #91338 from Calinou/find-in-files-increase-file-th…
Browse files Browse the repository at this point in the history
…reshold

Increase threshold for files per directory in editor Find in Files
  • Loading branch information
akien-mga committed May 7, 2024
2 parents 0494b37 + 760d7cb commit f9eb81e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/find_in_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ void FindInFiles::_scan_dir(const String &path, PackedStringArray &out_folders,

dir->list_dir_begin();

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

if (file.is_empty()) {
Expand Down

0 comments on commit f9eb81e

Please sign in to comment.