Prevent tree expansion blocking render

dhcp-server
Pat Hartl 2023-09-10 23:45:25 -05:00
parent a6417f4afa
commit 41d1ff4c5b
1 changed files with 10 additions and 7 deletions

View File

@ -293,14 +293,17 @@
foreach (var child in directory.Children)
{
var paths = Directory.EnumerateDirectories(child.Path, "*", new EnumerationOptions
{
IgnoreInaccessible = true,
RecurseSubdirectories = true,
MaxRecursionDepth = 1
});
await Task.Run(() =>
{
var paths = Directory.EnumerateDirectories(child.Path, "*", new EnumerationOptions
{
IgnoreInaccessible = true,
RecurseSubdirectories = true,
MaxRecursionDepth = 1
});
child.PopulateChildren(paths);
child.PopulateChildren(paths);
});
}
}
}