Re: [PATCH] proxy nautilus_file_is_in_trash to NautilusDirectory



On Mon, 2006-09-25 at 18:07 +0200, Christian Neumair wrote:
> Am Montag, den 25.09.2006, 11:26 +0200 schrieb Alexander Larsson:
> > On Sun, 2006-09-24 at 14:02 +0200, Christian Neumair wrote:
> > 
> > > Caveat: For trash directories (like ~/.Trash), is_in_trash will be FALSE
> > > after the patch is applied, before it was TRUE.
> > 
> > Why did this change?
> 
> Because the eel VFS helper returns TRUE for is_in_trash() if the
> passed-in URI is trash:///, or if it equals or it is a children of one
> of the trash directories on the volume the trash is located on. Because
> we pass the request to the parent, ~/.Trash will return the
> is_in_trash() info for ~, which is FALSE.
> 
> > It breaks a number of uses of is_in_trash() in nautilus.
> 
> How?

The problem is that a directory in trash:// will not open to
trash://dir/ but to ~/.Trash/dir, so any check for is_in_trash (like for
instance the one that decides on move-to-trash or delete-from-trash in
the context menu) will get things wrong.

> If you consider this a shortcoming, I suppose is_local() suffers from
> the same "issue", i.e. we're interested in the "file" aspect of the FS
> object, rather than the "directory" aspect, and so we chain up to the
> container.

I can't think of any situation where is_local() would be wrong. Being
local is a property of the whole mountpoint, whereas being inside a
trash folder is not.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a maverick misogynist photographer on a mission from God. She's a wealthy 
communist lawyer with an evil twin sister. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]