Skip to content

Commit 2734390

Browse files
committed
Small change
1 parent a20bbce commit 2734390

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

Files/Interacts/BaseLayoutCommandImplementationModel.cs

+10-3
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,16 @@ public virtual async void DragOver(DragEventArgs e)
528528
}
529529
else if (!draggedItems.Any())
530530
{
531-
e.DragUIOverride.IsCaptionVisible = true;
532-
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), folderName);
533-
e.AcceptedOperation = DataPackageOperation.Copy;
531+
if (pwd.StartsWith(App.AppSettings.RecycleBinPath))
532+
{
533+
e.AcceptedOperation = DataPackageOperation.None;
534+
}
535+
else
536+
{
537+
e.DragUIOverride.IsCaptionVisible = true;
538+
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), folderName);
539+
e.AcceptedOperation = DataPackageOperation.Copy;
540+
}
534541
}
535542
else
536543
{

Files/UserControls/SidebarControl.xaml.cs

+10-3
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,16 @@ private async void NavigationViewLocationItem_DragOver(object sender, DragEventA
499499
}
500500
else if (!storageItems.Any())
501501
{
502-
e.DragUIOverride.IsCaptionVisible = true;
503-
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), locationItem.Text);
504-
e.AcceptedOperation = DataPackageOperation.Copy;
502+
if (locationItem.Path.StartsWith(App.AppSettings.RecycleBinPath))
503+
{
504+
e.AcceptedOperation = DataPackageOperation.None;
505+
}
506+
else
507+
{
508+
e.DragUIOverride.IsCaptionVisible = true;
509+
e.DragUIOverride.Caption = string.Format("CopyToFolderCaptionText".GetLocalized(), locationItem.Text);
510+
e.AcceptedOperation = DataPackageOperation.Copy;
511+
}
505512
}
506513
else
507514
{

0 commit comments

Comments
 (0)