On Thu, 2008-10-02 at 12:56 +0200, Nelson Benítez León wrote:I like it. A few comments though:
> Hi!, I've posted a new patch in here[1] , the bug is about when
> drag'n'drop a file from a readonly location like "/etc" to some user
> folder, with the patch we change the drop action to COPY instead of
> MOVE, because the later causes an error due to "/etc" being
> readonly ...
+source_parent_is_writable_ (GFile *file)
Whats with the ending underscore?
I think its generally better to go via nautilus_file_get_existing() and
then nautilus_file_get_parent() since then we allocate one less GFile
and terminate earlier in the doesn't-exist case.
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.
Attachment:
writable3.diff
Description: Binary data