Re: [PATCH] Same filesystem drag-and-drop of a readonly file should gracefully degrade to a "copy"



2008/10/6 Alexander Larsson <alexl redhat com>
On Mon, 2008-10-06 at 15:36 +0200, Nelson Benítez León wrote:
> 2008/10/6 Alexander Larsson <alexl redhat com>
>         On Mon, 2008-10-06 at 14:39 +0200, Nelson Benítez León wrote:
>
>
>         >         Using is_writable isn't actually 100% correct, as on
>         some
>         >         filesystem the
>         >         move attribute may not be controlled by the
>         "writable" bit on
>         >         a
>         >         directory. For instance on a non-posix filesystem
>         with a more
>         >         complicated permissions system. However, I think its
>         good
>         >         enough, and if
>         >         you really want to move you can force via holding
>         down the
>         >         move
>         >         modifier.
>         >
>         >
>         >   Ok, updated patch is attached.
>
>
>         Actually, to be a gigant pain in the ass here, but there is an
>         even
>         better way. You should use nautilus_file_can_delete() on the
>         source file
>         (not parent).
>
>         This will require less code for you, and it will also be
>         slightly more
>         accurate. For instance, it will work if the source file is in
>         a writable
>         but sticky-bit directory (/tmp) but is not owned by you. It is
>         also
>         possible for other backends to implement this in special ways
>         if needed.
>
>    Haha, I thought it was just Perl not Nautilus that you could do
> same thing several ways :-), new (for now) patch attached...

Looks good to commit.

  It's now commited. Thank you.



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