If trash is inaccessable, delete is still shown despite unchecked "Show actions to permanently delete files and folders"
Version information
- Thunar 4.20.6
- openSUSE Tumbleweed XFCE Live x86_64 (snapshot 2025-12-05)
Steps to reproduce
- Make sure in Thunar's preferences, you have unchecked "Show actions to permanently delete files and folders"
- Navigate to a location that either doesn't support trash (e.g.
/tmp) or has had trash disabled (i.e. via the presence of blank.Trash-0,.Trash-999, and/or.Trash-1000files on the root of the current partition) - Highlight a file
- Open the right-click context menu and/or
Editmenu - Observe how
Deleteis still present
Current behavior
The permanent delete function is present in the right-click context menu and/or Edit menus on locations where Trash is inaccessible
Expected outcome
Honestly I think the way the Cinnamon DE does it may be best - basically, if you have unchecked "Show actions to permanently delete files and folders", then locations like /tmp still actually shows the Move to trash menu selection and indeed still hides the permanent Delete, but when you go to select Move to Trash it effectively not only asks "Are you sure?" but then basically says in a second subsequent message box "Cannot move to trash, permanently delete instead?" asking as a sort of "Are you really sure?" - also notable is that it highlights the "Cancel" button by default (i.e. you can't just accidentally press and/or hold the Enter key to permanently delete)
Another variation of this could be to use a single message box, but include a check box that requires clicking to subsequently also click the actual "Confirm" button.
(basically the idea is that, if someone e.g. myself personally wants to have unchecked "Show actions to permanently delete files and folders" then they want it to be much more difficult to accidentally delete files permanently. Just a few minutes ago, in my haste, I was going for right-click Rename but instead hit the Delete menu entry located right above it, and of course at that very moment I also stuttered and subsequently did an accidental double-click on Delete in the right-click context menu; but wait there's more - the Delete menu listing happened to be positioned on-screen exactly where the "Confirm" button showed up in the subsequent message box, thereby effectively going straight from accidentally selecting "Delete" in the right-click context menu to the file having been permanently deleted without having any chance to stop it)
