Re: [PATCH] Fix symlink trashing (yet again)



On Sun, 2005-10-09 at 16:21 +0200, Christian Neumair wrote:
> It turns out that my last symlink handling fix only worked for broken
> symlinks to other file systems.
> 
> gnome_vfs_find_directory resolves symlinks before determining the trash
> volume and will therefore return the trash directory for the link
> target, not the symlink itself. Because we've obviously used these
> GnomeVFS resolution semantics for a long time, I don't think we should
> change them.
> 
> The attached version ensures that symlinks can always be trashed, no
> matter where they point, by finding the trash using the source URIs
> parent whenever possible.

I don't think this is right. We should fix gnome-vfs to do the right
thing so that all uses of gnome-vfs (e.g. the trash applet) gets things
right. The symlink resolving was added in gnome-vfs 2.12 to fix similar
issues as a matter of fact (when a normal file is trashed and its in a
parent folder that is a symlink).

I think what gnome_vfs_find_directory really should do is to expand
symlinks for all elements of the parent of near_uri and use that to find
the target. Also, this all sounds a bit file:-specific, so it should
probably be moved into the file method.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a maverick misogynist messiah gone bad. She's a ditzy punk hooker living 
homeless in New York's sewers. They fight crime! 




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