Trash spec 0.4

David Faure dfaure at
Fri Sep 10 03:36:19 EEST 2004

On Friday 10 September 2004 01:44, Lars Hallberg wrote:
> David Faure wrote:
> >>Perhaps it's best to say that when restoring a file, it may only ever be
> >>restored to the exact same device the trash is on?  Following symlinks
> >>is OK so long as they are not followed off the device.
> >
> >Indeed (can be done by comparing st_dev of source file and destination directory I guess)
> >
> I'm a stupid user, I trash ~/mpg/foo.mpg, then i found my ~ full, move 
> ~/mpg/* to another partision and symlink it from ~

I think the above was another rule that only applies to $topdir trashes,
not to the home trash, so your example would have to be turned into
a other-partition-than-home example. But it could still happen indeed.

> Will be suprised and upset if I cant undelete foo.mpg :-(

As usual: security and convenience are exclusive... If we allow this then we
allow the so-called "trojan device" to operate. Well... IMHO it's not such
a big deal though, restoring a file is still an explicit operation, and overwriting
one another explicit operation....

> OK, if it can't be restored to its original location, thats OK, but I 
> sure want a save dialog or something - being able to untrash trash is a 
> critical operation for the users trust in the desktop!

Well if the restore operation doesn't work you can always simply drag-n-drop
the file from trash:/ to whereever you want it - I implemented that in KDE.

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the xdg mailing list