@@ -38,13 +38,13 @@ public async Task<ReturnResult> Undo(IStorageHistory history)
38
38
case FileOperationType . CreateNew : // Opposite: Delete created items
39
39
if ( ! IsHistoryNull ( history . Source ) )
40
40
{
41
- return await helpers . DeleteItemsAsync ( history . Source , false , true , false ) ;
41
+ return await helpers . DeleteItemsAsync ( history . Source , true , true , false ) ; // Show a dialog to prevent unexpected deletion
42
42
}
43
43
break ;
44
44
case FileOperationType . CreateLink : // Opposite: Delete created items
45
45
if ( ! IsHistoryNull ( history . Destination ) )
46
46
{
47
- return await helpers . DeleteItemsAsync ( history . Destination , false , true , false ) ;
47
+ return await helpers . DeleteItemsAsync ( history . Destination , true , true , false ) ; // Show a dialog to prevent unexpected deletion
48
48
}
49
49
break ;
50
50
case FileOperationType . Rename : // Opposite: Restore original item names
@@ -61,7 +61,7 @@ public async Task<ReturnResult> Undo(IStorageHistory history)
61
61
case FileOperationType . Copy : // Opposite: Delete copied items
62
62
if ( ! IsHistoryNull ( history . Destination ) )
63
63
{
64
- return await helpers . DeleteItemsAsync ( history . Destination , false , true , false ) ;
64
+ return await helpers . DeleteItemsAsync ( history . Destination , true , true , false ) ; // Show a dialog to prevent unexpected deletion
65
65
}
66
66
break ;
67
67
case FileOperationType . Move : // Opposite: Move the items to original directory
0 commit comments