Bug 510841

Summary: No prompt to permanently delete file after undoing
Product: [Applications] dolphin Reporter: leo <lcm>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: aristsakas, dolphin-bugs-null, lcm, meven
Priority: NOR    
Version First Reported In: 25.08.2   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Demonstration

Description leo 2025-10-20 18:53:06 UTC
Created attachment 185931 [details]
Demonstration

SUMMARY
If I copy a file, permanently delete the original file, then press undo (Ctrl + Z), the copied file gets permanently deleted and the file is lost permanently

STEPS TO REPRODUCE
1. Create file/folder
2. Copy file/folder
3. Delete original file/folder
4. Press Ctrl + Z
5. Observe permanent loss of file without warning

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: CachyOS Linux
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Comment 1 Méven 2025-10-23 15:50:44 UTC
> 5. Observe permanent loss of file without warning

So the destination of the copy is removed upon copying Ctrl+z is the issue.

What would you suggest dolphin would do then ?

We could have some confirmation when undoing the copy.

A clever thing to do would be in the Copy undo logic check if the original file is still there or not, and ask then if you want to remove the destination or move the file back where it was.
This would be a bit tedious to implement.

Still this might not be a legitimate feature: Ctrl+Z is a destructive operation by nature, it can delete files and directory and that's expected.
Comment 2 leo 2025-10-23 17:45:20 UTC
> We could have some confirmation when undoing the copy.
> 
> A clever thing to do would be in the Copy undo logic check if the original
> file is still there or not, and ask then if you want to remove the
> destination or move the file back where it was.
This is what I was envisioning.
Comment 3 aristsakas 2026-01-01 14:30:36 UTC

*** This bug has been marked as a duplicate of bug 451745 ***