Trash mechanism

Mike Hearn m.hearn at signal.QinetiQ.com
Wed Aug 25 14:05:59 EEST 2004


> Wouldn't the GPL licensing cause problems preloading it for non-GPL 
> compatible progams, though?

It's not the licensing that is problematic about libtrash: if people 
decided to go for it we could quickly and easily rewrite it under a 
looser license. The main problem is that it works by modifying the 
semantics of very low level functions. This is just asking to break 
backwards compatibility and have bizarre unexpected side effects.

In the past I've encountered some apps (sorry, not naming names) which 
create and delete files at a truly prolific speed. If every file that 
was deleted was stored in a trash can, you'd rapidly run out of disk space.

LD_PRELOADed libraries can be useful but we need better infrastructure 
in order to deploy them as part of a desktop system (in particular, some 
way to mark binaries as having particular libraries preloaded).

A better solution is either:

- to implement this at the FS level, so there is a userspace API to 
locate deleted files and undelete them, with space being selected for 
reuse based on the age of the deleted files and then actually deleted 
atomically

OR

- to have a freedesktop API specifically for trashing files, whereby 
trashing is something you only do for user documents and not for system 
level files.

thanks -mike



More information about the xdg mailing list