@@ -38,13 +38,13 @@ public async Task<ReturnResult> Undo(IStorageHistory history)
3838 case FileOperationType . CreateNew : // Opposite: Delete created items
3939 if ( ! IsHistoryNull ( history . Source ) )
4040 {
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
4242 }
4343 break ;
4444 case FileOperationType . CreateLink : // Opposite: Delete created items
4545 if ( ! IsHistoryNull ( history . Destination ) )
4646 {
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
4848 }
4949 break ;
5050 case FileOperationType . Rename : // Opposite: Restore original item names
@@ -61,7 +61,7 @@ public async Task<ReturnResult> Undo(IStorageHistory history)
6161 case FileOperationType . Copy : // Opposite: Delete copied items
6262 if ( ! IsHistoryNull ( history . Destination ) )
6363 {
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
6565 }
6666 break ;
6767 case FileOperationType . Move : // Opposite: Move the items to original directory
0 commit comments