GNOME Bugzilla – Bug 329515
moving items into computer:/// gives weird errors
Last modified: 2012-08-26 12:51:48 UTC
Forwarding a bug filed on the Debian BTS: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=312478 <i> I just (accidentally) tried moving an item from my home into 'Computer' (computer:///). Now, for whatever reason, that displays the message: The file "computer:///...07b4.desktop" already exists. Would you like to replace it? If you replace an existing file, its contents will be overwritten. [Skip] [Replace] If I try with a different source file I get the same message, indicating that maybe nautilus has a strange idea of what the destination is. If I tell it to overwrite the file, I get: Error "Operation not permitted" while copying computer:///...07b4.desktop". Would you like to continue? [Skip] [Cancel] [Retry] Skip is the only thing that works, Cancel just displays another error and Retry keeps displaying the same one. Something's definitely odd there about what nautilus thinks the target of the drag&drop is when it is computer:///. It probably should outright reject that drop. johannes </i> I confirm the same behaviour with nautilus 2.12.2
Thanks for the bug report. I can confirm this with 2.13.5 too.
This happens also with 2.21.5. I get a dialog saying "Operation not supported by backend". The right thing would be IMHO disable DnD to the view when you are in "Computer".
Cosimo, can we make a check if the target is computer:// (hardcoded) and then display a friendly message? I'll fix a patch for it in such case.
FWIW, it'd probably be nice to improve the error message saying something like "you cannot save to $PLACE" instead of "operation not supported by backend", which is quite a technical way of saying it. If anyone wants to implement that in gvfs, the file is in gvfs, daemon/gvfsjobopenforwrite.c, function is run. Not sure what the best text for $PLACE is though, maybe the backend's display name?
Created attachment 145311 [details] [review] Makes it possible to drop files to volumes in computer:// view This is just the nautilus part to be able to drop files into a volume in the computer view. The rest (the hard work) would be to enable write access in the computer backend. This will sort of fix the problem of this bug as the error message will go away for some cases.
Created attachment 145379 [details] [review] Adds drop support to volumes in computer://
This last patch adds support without changing the gvfs code and you can drop files to a mounted volume. Otherwise it will still give you the error message as this bug is about. (Not sure this is the right bug for this patch but it does, in some way, change the error message (by enable drop support)).
Created attachment 222370 [details] [review] Don't accept drops over non-writable locations in icon view
Created attachment 222371 [details] [review] Don't allow drops on tabs for unwritable slots
Review of attachment 222370 [details] [review]: Makes sense
Review of attachment 222371 [details] [review]: Looks good
Need to do the same for list view.
Created attachment 222402 [details] [review] Don't allow any type of drop (even text) if the target is readonly
Review of attachment 222402 [details] [review]: Looks good to me.