From f2a7536298965fd77d83ba74e4af83750b7143bf Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Wed, 4 Jun 2025 17:42:56 +0800 Subject: [PATCH] Use EnumerateFiles instead of GetFiles Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs index a427a0a42..80c99ab9f 100644 --- a/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs +++ b/Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs @@ -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) {