GNOME Bugzilla – Bug 720390
Type=Link Desktop file issue
Last modified: 2015-02-21 12:53:41 UTC
Hi. When having a desktop file of type "Link" and using nautilus to move it to another directory, it seems to copy the entire target of link instead of just moving the symlink. While I can live with this behavior, there is a big drawback in Classic mode in that if you want to move your icon on the Desktop, then instead it will start to copy the entire content of the linked directory. Here's an example of the dot.desktop file I created on my Desktop: [Desktop Entry] Name=Data Encoding=UTF-8 Type=Link Icon=folder-remote URL=file:///data/ It will appear as "Data" on my Desktop; moving it anywhere on the Desktop will start a copy of /data into a new directory (obviously called "data").
*** Bug 720485 has been marked as a duplicate of this bug. ***
If a Desktop Entry file of Type 2 (Link) is Dragged and Dropped the item referenced by the URL= entry in the .desktop file is moved or copied not the .desktop file itself. This can lead to near disastrous results when moving several items at once from one folder to another. This behaviour is inconsistent with the handling of all other Desktop Entry types. This is a bad bug.
Several people on Ubuntu report this issue: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1278437
I can confirm this bug. I notice it with both Firefox and Chrome, when I drag from the addressbar to the desktop to create a link. This works normally, but then I often want to move it on the desktop to a different location. I was very surprised to find that it created a new icon, which does not even work. Very unexpected and annoying. I'm using a fully-updated Ubuntu 14.04 with Gnome Fallback desktoop.
This annoying bug still exists on nautilus 3.14.2 (eg. on fedora 21 or ubuntu 14.10) I'm not sure if everybody have this problem or if it is caused by a malformed setting on my system. Unfortunately I have no idea where to search :-(
> I'm not sure if everybody have this problem or if it is caused by a malformed > setting on my system. Unfortunately I have no idea where to search :-( It's 100% reproducible on all machines I have that run GNOME; independent of the operating system.
Created attachment 293378 [details] [review] Fix dnd issues of Type=Link desktop files The bug is present both in list view and icon view. The problem was using activation uri of Type=Link desktop files when creating the NautilusDragSelectionItem items for dnd. This patch fixes it for me, pasting here the commit message: dnd: fix dnd issues with Type=Link desktop files When creating NautilusDragSelectionItem items for dnd make sure we use regular uri (instead of activation uri) for Type=Link desktop files. Other types of desktop files were not affected by this bug as their regular uri and activation uri are usually the same.
Review of attachment 293378 [details] [review]: Is there any reason to keep the activation uri code path then? ::: libnautilus-private/nautilus-canvas-dnd.c @@ +238,2 @@ uri = nautilus_canvas_container_get_icon_uri (container, icon); + if (!eel_uri_is_desktop (uri) && !g_str_has_suffix (uri, ".desktop")) { I'd rather this used nautilus_file_is_nautilus_link() too
(In reply to comment #8) > Review of attachment 293378 [details] [review]: > > Is there any reason to keep the activation uri code path then? I don't know the original motivation for the activation uri code path, so I'm not confident removing it. > > ::: libnautilus-private/nautilus-canvas-dnd.c > @@ +238,2 @@ > uri = nautilus_canvas_container_get_icon_uri (container, icon); > + if (!eel_uri_is_desktop (uri) && !g_str_has_suffix (uri, ".desktop")) { > > I'd rather this used nautilus_file_is_nautilus_link() too I thought this was not possible from nautilus-canvas-dnd.c but was wrong. I'm attaching a new patch with this fixed.
Created attachment 293976 [details] [review] Fix dnd issues of Type=Link desktop files v2
Review of attachment 293976 [details] [review]: Looks good, thanks.
Comment on attachment 293976 [details] [review] Fix dnd issues of Type=Link desktop files v2 Looks good, thanks.
Comment on attachment 293976 [details] [review] Fix dnd issues of Type=Link desktop files v2 Committed.
It is fixed in any version of nautilus?
(In reply to xabiorama from comment #15) > It is fixed in any version of nautilus? Nautilus version 3.15.4 onwards.