GNOME Bugzilla – Bug 657637
Nautilus duplicates files when searched and moved
Last modified: 2014-12-22 08:30:49 UTC
When you search for files, find them, select them and move them by dragging to different folder in the same drive/partition, the files are copied and not moved. You end up with duplicate files. Example: Enter folder you want to search for files. Letś say movies, contr-f, search for .avi Result shows you all avi files in folder. Select, and move them to another folder in the same partition. Result: Files are copied to the destination folder. Expected result: Files should be moved if they are in the same partition.
I think this is a enhancement, because the drag and drop for default options is copy. I also think if you have "moved options" for the files with drag and drop is very risks to accidentally lose information.
As far as I know, normal behavior for any drag and drop from one folder to other is MOVE, only being COPY when destination folder is from a different partition. Being files in a searched result should make no exception. *I'm a little confused by your saying that default setting is copy. All systems I've used act as described, including gnome... unless ubuntu's gnome does not have the default nautilus setting for this (I'm on ubuntu as you can guess). **ps2. On the "risks to accidentally lose information", that would make sense when the move is from one partition to other, reason for which normal behavior across platforms is "copy" when different partitions, but "move" when in the same partition. As far as I can tell, what I suggest would be as "risky" as renaming the file: basically none. Thanks.
I think the only way to drag and drop files with an active search is to use multiple windows. And it seems to work fine here doing this: * mkdir ~/Test1 * touch ~/Test1/foo * nautilus ~/Test1/ * mkdir ~/Test2 * nautilus ~/Test2/ * Search for "foo" in Test1 * Drag search result to Test2 Seems to move the file. Does that no work for you in master?
With Nautilus 3.8, it's simply impossible to move file from a search result window to a folder. Even with using two Nautilus windows.
Should I open a new bug report or is it fine with this one?
I don't have nautilus 3.8, but I tested with nautilus from git master, and I can move a file from the search results. However, the search results are not updated, giving the illusion that the file was copied. But if I press F5, the moved file is no longer in the search results. Julien, do you see the same thing in 3.8?
Antonio, on Nautilus 3.8.1 from Ubuntu GNOME, you just can't move files from a search result to another window or tab. It just does nothing. So I guess it's being worked on in master, and it's just not perfect yet.
Julien, oh, sorry, you did say it was "simply impossible". :) Then, yes, please file a new bug report.
OK, I reported it as bug #699420.
*** Bug 729572 has been marked as a duplicate of this bug. ***
I can reproduce this bug but only if the search results are in Icon View. Following the steps from comment 3, if the search results view is set to Icon View, the file will be copied. If it is set to List view, the file will be moved.
I forgot to mention I'm able to reproduce this bug in both nautilus 3.12.2 and nautilus from git master (3.13.x).
I looked at the code from git master. When in list view mode, drag actions for gtk_drag_begin include GDK_ACTION_MOVE (nautilus-list-view.c: motion_notify_callback). But when in icon view, GDK_ACTION_MOVE is included only if search is not active (nautilus-canvas-container.c: motion_notify_event, checking drag_allow_moves that is set from nautilus-cavas-view.c: nautilus_cavas_view_begin_loading). Was there a reason for this exclusion of GDK_ACTION_MOVE? When I include GDK_ACTION_MOVE everytime, it works OK.
Created attachment 282137 [details] [review] patch Here is a patch that enables move in icon search view.
Review of attachment 282137 [details] [review]: Looks good - sorry for the late review.
Pushed to master.