Skip to content

Commit 64928dd

Browse files
authored
Fix: Fixed COMException when drag-and-dropping items (#16061)
1 parent 0ed9188 commit 64928dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Files.App/Utils/Storage/Operations/FilesystemHelpers.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ showDialog is DeleteConfirmationPolicies.PermanentOnly &&
163163
App.HistoryWrapper.AddHistory(history);
164164

165165
// Execute removal tasks concurrently in background
166-
_ = Task.WhenAll(source.Select(x => jumpListService.RemoveFolderAsync(x.Path)));
166+
var sourcePaths = source.Select(x => x.Path);
167+
_ = Task.WhenAll(sourcePaths.Select(jumpListService.RemoveFolderAsync));
167168

168169
var itemsCount = banner.TotalItemsCount;
169170

@@ -475,7 +476,8 @@ public async Task<ReturnResult> MoveItemsAsync(IEnumerable<IStorageItemWithPath>
475476
}
476477

477478
// Execute removal tasks concurrently in background
478-
_ = Task.WhenAll(source.Select(x => jumpListService.RemoveFolderAsync(x.Path)));
479+
var sourcePaths = source.Select(x => x.Path);
480+
_ = Task.WhenAll(sourcePaths.Select(jumpListService.RemoveFolderAsync));
479481

480482
var itemsCount = banner.TotalItemsCount;
481483

0 commit comments

Comments
 (0)