After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 657637 - Nautilus duplicates files when searched and moved
Nautilus duplicates files when searched and moved
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File Search Interface
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 729572 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-08-29 15:50 UTC by Sistemático
Modified: 2014-12-22 08:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.24 KB, patch)
2014-07-31 13:04 UTC, Jakub Srba
committed Details | Review

Description Sistemático 2011-08-29 15:50:01 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.
Comment 1 Fabio Durán Verdugo 2011-08-29 18:01:47 UTC
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.
Comment 2 Sistemático 2011-08-29 20:39:03 UTC
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.
Comment 3 William Jon McCann 2012-09-04 23:11:22 UTC
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?
Comment 4 Julien Olivier 2013-05-01 09:32:56 UTC
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.
Comment 5 Julien Olivier 2013-05-01 09:33:33 UTC
Should I open a new bug report or is it fine with this one?
Comment 6 António Fernandes 2013-05-01 09:54:56 UTC
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?
Comment 7 Julien Olivier 2013-05-01 18:36:41 UTC
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.
Comment 8 António Fernandes 2013-05-01 19:07:22 UTC
Julien, oh, sorry, you did say it was "simply impossible". :) Then, yes, please file a new bug report.
Comment 9 Julien Olivier 2013-05-01 20:41:51 UTC
OK, I reported it as bug #699420.
Comment 10 António Fernandes 2014-05-19 17:14:14 UTC
*** Bug 729572 has been marked as a duplicate of this bug. ***
Comment 11 António Fernandes 2014-05-19 23:01:34 UTC
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.
Comment 12 António Fernandes 2014-05-20 11:31:51 UTC
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).
Comment 13 Jakub Srba 2014-07-30 12:05:21 UTC
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.
Comment 14 Jakub Srba 2014-07-31 13:04:53 UTC
Created attachment 282137 [details] [review]
patch

Here is a patch that enables move in icon search view.
Comment 15 Cosimo Cecchi 2014-10-12 00:16:37 UTC
Review of attachment 282137 [details] [review]:

Looks good - sorry for the late review.
Comment 16 Cosimo Cecchi 2014-12-22 08:30:42 UTC
Pushed to master.