dfaure at trolltech.com
Wed Aug 25 15:28:34 EEST 2004
On Wednesday 25 August 2004 14:10, C. Gatzemeier wrote:
> Am Wednesday 25 August 2004 13:05 schrieb Mike Hearn:
> > 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).
> Yeah, I had simmilar doubts. But after reading libtrash readme I found it
> quite reasonable. Libtrash already takes several measures. When preloaded it
> checks for environment variables that can control its behaviour for example.
I don't see libtrash as a reasonable solution for the needs of desktop-level trash
functionality, for two reasons:
* Bad design
Changing the meaning of low-level glibc calls is not only fragile, it's also unflexible.
How would one be able to ensure that manually-deleted files from /tmp that could
be important to the user get to the trash, but temp files from compilation don't?
The proper solution is to let the low-level calls do what they always did, and let
the user-level applications (GUI apps and fileutils tools) use the trash functionality,
while other programs deleting files (like gcc for the case of object files) shouldn't.
* Lack of metadata information
We need a proper trash abstraction with metadata associated to the deleted files
(including date of deletion, original mtime, original location),
of which libtrash only provides the third one.
As always: let's try to standardize on the behavior, not necessarily on the code.
If we come up with a reasonable standard for this, libtrash can obviously use
the same on-disk representation as the GUI filemanagers, for people who really
want their command-line tools and other apps to trash files automatically.
What I want to know is what Nautilus and other filemanagers with non-trivial trash-can
functionality currently do, to come up with a proposal that doesn't diverge too
much where not necessary. (Unfortunately the Nautilus developers who took part in
the 2001 discussion were eazel developers and now work at apple...)
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the xdg