Adding a regex based solution for enumerating files looking for multiple extensions at same time (#811)

* Adding a regex based solution for enumerating files looking for multiple extensions at same time. This should give better performance than enumerating over the same files multiple times looking for different patterns

* Adding a timeout value for regex per security recommendation

* Store the regex directly so we don't have to keep constructing it, also adding some logging and handling for exceptions when enumerating files
This commit is contained in:
Jeff Dolan authored and GitHub committed 2025-11-03 17:11:31 +01:00
1 parent e9b44294e8
commit 1e19e2928c
2 files changed
+49 -25

No files matched your search

+1 -2
View File
@@ -348,8 +348,7 @@ namespace Vocaluxe.Base
{
if (Directory.Exists(path))
{
files = files.Union(CHelper.ListFiles(path, "*.txt", true, true));
files = files.Union(CHelper.ListFiles(path, "*.txd", true, true));
files = files.Union(CHelper.ListTextFiles(path, true, true));
}
}
}