Skip to content

Commit 031fa4c

Browse files
Disabled dragging in recycle bin
1 parent bf979b8 commit 031fa4c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Files.Uwp/BaseLayout.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,8 @@ protected static void FileListItem_PointerPressed(object sender, PointerRoutedEv
10191019
}
10201020
}
10211021

1022+
private readonly RecycleBinHelpers recycleBinHelpers = new();
1023+
10221024
protected void InitializeDrag(UIElement containter, ListedItem item)
10231025
{
10241026
if (item is null)
@@ -1027,7 +1029,7 @@ protected void InitializeDrag(UIElement containter, ListedItem item)
10271029
}
10281030

10291031
UninitializeDrag(containter);
1030-
if (item.PrimaryItemAttribute == StorageItemTypes.Folder || item.IsExecutable)
1032+
if ((item.PrimaryItemAttribute == StorageItemTypes.Folder && !recycleBinHelpers.IsPathUnderRecycleBin(item.ItemPath)) || item.IsExecutable)
10311033
{
10321034
containter.AllowDrop = true;
10331035
containter.DragOver += Item_DragOver;

0 commit comments

Comments
 (0)