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.
This commit is contained in:
Hugo Locurcio 2024-04-30 01:01:28 +02:00
parent 89850d553e
commit 760d7cb231
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 3 additions and 1 deletions

View File

@ -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()) {