Skip to content

Commit 16eb4a7

Browse files
authored
Fix: Fixed InvalidOperationException in FolderSearch.AddItemsForHomeAsync (#15671)
1 parent 3c85604 commit 16eb4a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Utils/Storage/Search/FolderSearch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private async Task AddItemsForHomeAsync(IList<ListedItem> results, CancellationT
101101
}
102102
else
103103
{
104-
foreach (var drive in drivesViewModel.Drives.Cast<DriveItem>().Where(x => !x.IsNetwork))
104+
foreach (var drive in drivesViewModel.Drives.ToList().Cast<DriveItem>().Where(x => !x.IsNetwork))
105105
{
106106
await AddItemsAsync(drive.Path, results, token);
107107
}

0 commit comments

Comments
 (0)