Skip to content

Commit f2a7536

Browse files
Jack251970Copilot
andauthored
Use EnumerateFiles instead of GetFiles
Co-authored-by: Copilot <[email protected]>
1 parent edb4d74 commit f2a7536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public static string GetFolderSize(string folderPath)
151151
var directoryInfo = new DirectoryInfo(folderPath);
152152
long size = 0;
153153
var cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(3));
154-
foreach (var file in directoryInfo.GetFiles("*", SearchOption.AllDirectories))
154+
foreach (var file in directoryInfo.EnumerateFiles("*", SearchOption.AllDirectories))
155155
{
156156
if (cancellationTokenSource.Token.IsCancellationRequested)
157157
{

0 commit comments

Comments
 (0)