Trash spec: need decisions on some points

Alexander Larsson alexl at
Wed Sep 1 09:54:28 EEST 2004

On Tue, 2004-08-31 at 17:36, Jerry Haltom wrote:
> > This is not the only case when you need an absolute path if you do this.
> > Say you have /mnt/hdb1, and a symlink /opt/foobar -> /mnt/hdb1/foobar
> > (very common setup). Then you can trash stuff in /opt/foobar that ends
> > up in /mnt/hdb1/.Trash/. Same with $HOME/.Trash, its not only used for
> > stuff under $HOME, but the whole partition that $HOME is stored on
> > (which for many systems is the one and only partition the whole OS is
> > on).
> It may be just that it's morning, but I don't see how a relative path name
> breaks this.
> /opt/foobar/ -> /mnt/hdb1/foobar
> File in question /opt/foobar/blah.
> Follow the link fully, delete it's local counterpart. This would result in
> /mnt/hdb1/foobar/blah being moved to /mnt/hdb1/.Trash-$user/.
> What's wrong with this?

I guess it works if you fully resolve symlinks first. However, that will
hardcode what might be an implementation that can change (that
/opt/foobar is on /mnt/hdb1). Also, it doesn't fix the same issue when a
filesystem has been --bind mounted to another place. Nor the outside
$home issue.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl at    alla at 
He's a jaded misogynist master criminal on a search for his missing sister. 
She's a psychotic blonde schoolgirl on her way to prison for a murder she 
didn't commit. They fight crime! 

More information about the xdg mailing list