mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use EnumerateFiles instead of GetFiles
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
edb4d743e9
commit
f2a7536298
1 changed files with 1 additions and 1 deletions
|
|
@ -151,7 +151,7 @@ public partial class PreviewPanel : UserControl, INotifyPropertyChanged
|
|||
var directoryInfo = new DirectoryInfo(folderPath);
|
||||
long size = 0;
|
||||
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(3));
|
||||
foreach (var file in directoryInfo.GetFiles("*", SearchOption.AllDirectories))
|
||||
foreach (var file in directoryInfo.EnumerateFiles("*", SearchOption.AllDirectories))
|
||||
{
|
||||
if (cancellationTokenSource.Token.IsCancellationRequested)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue