Bug 282919 - For trashed items, show the path to the actual file/folder on the disk in the properties dialog
Summary: For trashed items, show the path to the actual file/folder on the disk in the...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Trash (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: reproducible, usability
Depends on:
Blocks:
 
Reported: 2011-09-27 17:05 UTC by Javier
Modified: 2021-07-20 23:57 UTC (History)
9 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 Javier 2011-09-27 17:05:17 UTC
Version:           1.7 (using KDE 4.7.1) 
OS:                Linux

I wanted to empty the trash but a file with invalid unicode name refused to delete, so I hit F4 and entered a `rm -rf *` :_(

Reproducible: Always

Steps to Reproduce:
Open dolphin, change to Trash location, hit F4.


Actual Results:  
Terminal opens in ~

Expected Results:  
Terminal opens in ~/.local/share/Trash/files or ~/.local/share/Trash

I'm sending it with severity normal -as it's a strange case- but this is potencially catastrophic :(
Comment 1 Frank Reininghaus 2011-09-27 23:29:35 UTC
Thanks for the bug report! I can confirm the issue in master.

Strange bug. Actually, the correct folder is opened for other special locations like desktop:/, but not for trash:/
Comment 2 Jekyll Wu 2011-10-20 10:56:02 UTC
The problem is dolphin should send something like 'cd ~/.local/share/Trash' into the terminal-panel, while it actually sends nothing.
Comment 3 Ahmet Emre Aladağ 2012-06-22 09:12:57 UTC
I had the same problem and removed all my home directory. Hasn't anybody found a solution for this? Importance should be higher..
Comment 4 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:19:42 UTC
Resetting assignee to default as per bug #305719
Comment 5 Bryan Cuneo 2012-10-31 02:34:14 UTC
[Part of the Dolphin Bug Weeks 2012]
For me, the terminal opens in /, not ~/.
Comment 6 Frank Reininghaus 2013-02-28 18:46:15 UTC
I think the bug is actually in kdelibs. If the current URL does not look like a local directory that we can easily cd to, we start a KIO::mostLocalUrl job to determine a URL which is more useful for us.

For desktop:/, the job returns the correct local URL, but not for trash:/
Comment 7 Dawit Alemayehu 2013-06-24 02:26:22 UTC
(In reply to comment #6)
> I think the bug is actually in kdelibs. If the current URL does not look
> like a local directory that we can easily cd to, we start a
> KIO::mostLocalUrl job to determine a URL which is more useful for us.
> 
> For desktop:/, the job returns the correct local URL, but not for trash:/

This is a problem with kio_trash itself. If as you stated Dolphin uses KIO::mostLocalUrl to determine the proper URL, then you are not going to get any useful path returned because that KIO::mostLocalUrl simply performs a stat to which kio_trash responds to by doing... nothing. It returns an empty UDSEntry. 

Not entirely sure whether or not the problem is in how Dolphin deals with what KIO::mostLocalUrl returns or how KIO::mostLocalUrl itself handles such "special" protocols. Perhaps David would know??
Comment 8 Frank Reininghaus 2013-06-24 08:46:55 UTC
Thanks Dawit for looking into it. David might know what the problem could be (he wrote the code in TerminalPanel::slotMostLocalUrlResult(KJob* job)).
Comment 9 Ahmad Samir 2021-07-20 23:56:37 UTC
There is no way to fix this, because kio_trash is a view on all the physical trash directories:
~/.local/share/Trash  - the default trash dir, when you delete something from $HOME, that's where it goes; also used as fallback

/path/to-another-partition-mount-point/.Trash-$UID  - if you delete something from /path/to-another-partition-mount-point/ it's moved to that dir (moving trashed items to a dir on the same partition is much faster vs moving them to ~/.local/share/Trash (which is on another partition/disk).

We could maybe improve the situation by showing the actual path to the trash dir where a trashed item resides in e.g. the properties dialog, so the user can delete the file manually from terminal ...etc. This will leave the corresponding .trashinfo (e.g. ~/.local/share/Trash/info/foo.trashinfo file behind, that gets cleaned up when you use the trash the next time).