Skip to content

Commit 302161c

Browse files
authored
Fix: Fixed issue where items couldn't be dropped from 7-zip (#14918)
1 parent 951c330 commit 302161c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Files.App/ViewModels/Layouts/BaseLayoutViewModel.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,17 @@ public async Task DropAsync(DragEventArgs e)
170170

171171
if (FilesystemHelpers.HasDraggedStorageItems(e.DataView))
172172
{
173-
await _associatedInstance.FilesystemHelpers.PerformOperationTypeAsync(e.AcceptedOperation, e.DataView, _associatedInstance.FilesystemViewModel.WorkingDirectory, false, true);
174-
await _associatedInstance.RefreshIfNoWatcherExistsAsync();
173+
var deferral = e.GetDeferral();
174+
175+
try
176+
{
177+
await _associatedInstance.FilesystemHelpers.PerformOperationTypeAsync(e.AcceptedOperation, e.DataView, _associatedInstance.FilesystemViewModel.WorkingDirectory, false, true);
178+
await _associatedInstance.RefreshIfNoWatcherExistsAsync();
179+
}
180+
finally
181+
{
182+
deferral.Complete();
183+
}
175184
}
176185
}
177186

0 commit comments

Comments
 (0)