Trash Spec Idea

João Valverde backup95 at
Wed Aug 13 13:03:11 PDT 2008

Brian J. Tarricone wrote:
> João Valverde wrote:
>> I think another approach is needed. This information needs to be 
>> centralized somewhere. My suggestion is (following the spirit of the 
>> current spec) to create some metadata *.trashcan files in 
>> $XDG_DATA_HOME/Trash that would describe every other partition's 
>> trashcan, obviously containing the full path and maybe with some size 
>> limits and auto cleanup settings as a bonus.
> [...]
>> These would either be created and configured by an administrator or by 
>> implementations when opening trashcans.
> So what happens when the user adds a disk to the system?  They have to 
> remember to edit this metadata?  Or does some C implementation of the 
> trash spec have to update this?  If so, then how is that better than the 
> current situation of determining on the fly?

The way that it's better is that parsing mtab everytime cannot be 
described as on the fly, at least without caching.

But you're right, I failed to consider the case where there is already a 
trash folder in the newly added disk and no *.trashcan file describing 
it on the $XDG_DATA_HOME partition. In this case this method is pretty 
hopeless unless some service would detect the newly mounted volume and 
create the *.trashcan file automatically. Nevermind then.


João V.

More information about the xdg mailing list