Items in trash can cannot be opened by other applications. Only "Restore" is available by default.
This is caused by the limitation of GVFS and GIO. That's why gnome/nautilus doesn't support this, either.
I, however, found a good and easy way to overcome this.
The filenames listed in trash:/// by gvfs are carefully encoded to carry important information.
Handling of trashed file name can be found in gvfs source code:
The filename listed under trash:/// are encoded according to the real path on disk.
Basically gvfs takes the original real path of the file, and then encode and escape it.
All / characters are replaced by \ and \ chars are replaced by "`\".
So if we can unescape the filename, we can get the real path on disk.
Then we can pass its real path to applications to open them.
Hence we can provide what nautilus can't do.
This should be a TODO item for next release after 0.9.9.
Log in to post a comment.