Bug 332466 - Delete operations not added to the undo/redo stack
Summary: Delete operations not added to the undo/redo stack
Status: RESOLVED NOT A BUG
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL: http://youtu.be/N7-fZJaJUv8
Keywords: junior-jobs, usability
Depends on:
Blocks:
 
Reported: 2014-03-22 23:43 UTC by Brock McNuggets
Modified: 2018-04-21 19:41 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brock McNuggets 2014-03-22 23:43:07 UTC
When you empty the trash you are told you cannot undo this, but the undo option is still available in the menu; it leads to an error about not being able to rename files.


Reproducible: Always

Steps to Reproduce:
See video
Comment 1 Christoph Feck 2014-03-24 23:13:07 UTC
The Undo action refers to the previous operation, e.g. if you copy a file from A to B, then empty the Trash, then you can still Undo the copy.
Comment 2 Brock McNuggets 2014-03-24 23:48:34 UTC
Thank you for the explaination. It would be more clear if the error message told you that you could not rename because the file no longer exists. That would clear up things considerably.
Comment 3 saloni gupta 2017-05-24 11:19:26 UTC
this problem with all operating systems or particular one
Comment 4 saloni gupta 2017-05-25 13:14:26 UTC
one way is to rename the file is that first restore this than change the name.
Comment 5 Nate Graham 2018-04-17 23:14:34 UTC
The bug here is that whatever made the file no longer exist isn't being added to the undo/redo stack. It works properly when the file has been put into the trash, but not when the file has been deleted. I was able to reproduce that in Dolphin and KIO from git master (i.e. KF 5.46 and Dolphin 18.08).

That seems like a Dolphin-specific issue though, not KIO's problem. Moving there.
Comment 6 Elvis Angelaccio 2018-04-21 09:06:38 UTC
I don't understand, are you saying that a delete job should be added to the undo stack? That's just not possible. 

(What we could do is to add a "cannot be undone" warning in the delete dialog)
Comment 7 Nate Graham 2018-04-21 13:32:12 UTC
(In reply to Elvis Angelaccio from comment #6)
> I don't understand, are you saying that a delete job should be added to the
> undo stack? That's just not possible. 
> 
> (What we could do is to add a "cannot be undone" warning in the delete
> dialog)

That would be nice, for sure. But what's the technical barrier to being able to undo a delete job? Seems like we could cache the to-de-deleted file in memory or somewhere on disk or for a short period of time just prior to deletion, to allow the job to be undone. But if that's too hairy technically, a warning would be nice too.
Comment 8 Elvis Angelaccio 2018-04-21 15:12:36 UTC
(In reply to Nate Graham from comment #7)
> (In reply to Elvis Angelaccio from comment #6)
> > I don't understand, are you saying that a delete job should be added to the
> > undo stack? That's just not possible. 
> > 
> > (What we could do is to add a "cannot be undone" warning in the delete
> > dialog)
> 
> That would be nice, for sure. But what's the technical barrier to being able
> to undo a delete job? Seems like we could cache the to-de-deleted file in
> memory or somewhere on disk or for a short period of time just prior to
> deletion, to allow the job to be undone.

Why? Why not just use the Trash? This is exactly what is made for.

Shift+Del means _permanent_ deletion everywhere. If that's not clear enough, we should really explain it better in the delete dialog.
Comment 9 Nate Graham 2018-04-21 19:41:50 UTC
(In reply to Elvis Angelaccio from comment #8)
> Shift+Del means _permanent_ deletion everywhere. If that's not clear enough,
> we should really explain it better in the delete dialog.

Sounds good. Here, have a patch!

https://phabricator.kde.org/D12420