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 773988 - Regression: When opening multiple files, their order is reversed
Regression: When opening multiple files, their order is reversed
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-05 17:34 UTC by userwithuid
Modified: 2016-11-10 12:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file: create filtered file lists in correct order (1.19 KB, patch)
2016-11-05 19:10 UTC, Ernestas Kulik
committed Details | Review

Description userwithuid 2016-11-05 17:34:40 UTC
Downstream bug: https://bugs.archlinux.org/task/51461

How to reproduce: Select multiple files and open them with an application that cares about file order (for example audio files in a media player).

Expected: Files are ordered as shown in nautilus
Actual result: Order is reversed


Reason:

Caused by commit https://git.gnome.org/browse/nautilus/commit/?id=51dbfc977808b996aedf96b819766b8c982adc59

Specifically, it's the part where "file_to_activate" is now used instead of "files". "files_to_activate" is the negative! list from the "nautilus_file_list_filter" call above, and is in reverse order.

Looking at file "nautilus-file.c", fuction "nautilus_file_list_filter": It creates both the positive and negative list in reverse order (for performance reasons according to the comment). The positive list is correctly reordered to make up for this, the negative list is not.
Comment 1 Ernestas Kulik 2016-11-05 19:10:58 UTC
Created attachment 339178 [details] [review]
file: create filtered file lists in correct order

nautilus_file_list_filter() creates lists in the wrong order, causing
files activation to occur in the same fashion. This is caused by double
reversal of the file list when filtering files.
Comment 2 Carlos Soriano 2016-11-10 11:37:37 UTC
Review of attachment 339178 [details] [review]:

oh right! thanks Ernestas!
Comment 3 Ernestas Kulik 2016-11-10 12:07:28 UTC
Attachment 339178 [details] pushed as 87d4cbf - file: create filtered file lists in correct order