Re: [PATCH] Only consider selection when deciding whether deletion is possible



On Mon, 2007-01-01 at 21:52 +0100, Christian Neumair wrote:
> Am Donnerstag, den 21.12.2006, 20:49 +0100 schrieb Christian Neumair:
> > Nautilus used to query whether the displayed location is readable when
> > deciding whether files are readable. It should rather consider the
> > selected files themselves.
> > 
> > Proposed patch attached, should fix bug 316301:
> > http://bugzilla.gnome.org/show_bug.cgi?id=316301
> 
> Hrm this is obviously wrong for UNIX-like permissions.
> 
> Calling nautilus_file_can_rename() for each selected item might be
> better, but I'm not sure whether this applies for all file systems.

The problem is that we're calling can_write on the directory that we're
displaying (i.e. a virtual search location), but what is really needed
is to look at the directory of each selected file and see if that is
writable.

Of course, the is_writable check is only totally right for somewhat
posix-like semantics, and this calls for separate can_move() calls in
gvfs.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a superhumanly strong playboy photographer with a mysterious suitcase 
handcuffed to his arm. She's a psychotic foul-mouthed college professor who 
hides her beauty behind a pair of thick-framed spectacles. They fight crime! 




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