Re: [PATCH] proxy nautilus_file_is_in_trash to NautilusDirectory



Am Dienstag, den 26.09.2006, 09:41 +0200 schrieb Alexander Larsson:
> 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.

I disagree. The request to ~/.Trash/dir will be proxied to ~/.Trash,
which will return TRUE because "the eel VFS helper (also) returns TRUE
for is_in_trash() if the passed-in URI (...) equals (...) one of the
trash directories on the volume (...) (the file corresponding to
passed-in URI) is located on).". In short:
 eel_uri_is_in_trash ("file:///home/alex/.Trash")
returns TRUE, so the proxy won't hurt.

-- 
Christian Neumair <chris gnome-de org>




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