diff --git a/Files/Interacts/BaseLayoutCommandImplementationModel.cs b/Files/Interacts/BaseLayoutCommandImplementationModel.cs index a1cc14dde852..7c9329f0b0ef 100644 --- a/Files/Interacts/BaseLayoutCommandImplementationModel.cs +++ b/Files/Interacts/BaseLayoutCommandImplementationModel.cs @@ -528,9 +528,16 @@ public virtual async void DragOver(DragEventArgs e) } else if (!draggedItems.Any()) { - e.DragUIOverride.IsCaptionVisible = true; - e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), folderName); - e.AcceptedOperation = DataPackageOperation.Copy; + if (pwd.StartsWith(App.AppSettings.RecycleBinPath)) + { + e.AcceptedOperation = DataPackageOperation.None; + } + else + { + e.DragUIOverride.IsCaptionVisible = true; + e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), folderName); + e.AcceptedOperation = DataPackageOperation.Copy; + } } else { diff --git a/Files/UserControls/SidebarControl.xaml.cs b/Files/UserControls/SidebarControl.xaml.cs index c8ad57c9210b..5902b23e6e39 100644 --- a/Files/UserControls/SidebarControl.xaml.cs +++ b/Files/UserControls/SidebarControl.xaml.cs @@ -499,9 +499,16 @@ private async void NavigationViewLocationItem_DragOver(object sender, DragEventA } else if (!storageItems.Any()) { - e.DragUIOverride.IsCaptionVisible = true; - e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), locationItem.Text); - e.AcceptedOperation = DataPackageOperation.Copy; + if (locationItem.Path.StartsWith(App.AppSettings.RecycleBinPath)) + { + e.AcceptedOperation = DataPackageOperation.None; + } + else + { + e.DragUIOverride.IsCaptionVisible = true; + e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), locationItem.Text); + e.AcceptedOperation = DataPackageOperation.Copy; + } } else {