summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@src.gnome.org>2016-11-05 21:08:36 +0200
committerErnestas Kulik <ernestask@src.gnome.org>2016-11-10 14:07:09 +0200
commit87d4cbfcbef5c83319b9f4569cd36d7c1b2e14c2 (patch)
treedf26bce7aff79c399ef2f25d707e4ca6fe919005 /src
parent56736b5abda3382a2e19781e44fd5f51e138e481 (diff)
downloadnautilus-87d4cbfcbef5c83319b9f4569cd36d7c1b2e14c2.tar.gz
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. https://bugzilla.gnome.org/show_bug.cgi?id=773988
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 4f63e3981..f72645a38 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -4121,15 +4121,13 @@ nautilus_file_list_filter (GList *files,
{
GList *filtered = NULL;
GList *l;
- GList *last;
GList *reversed;
*failed = NULL;
/* Avoid using g_list_append since it's O(n) */
reversed = g_list_copy (files);
reversed = g_list_reverse (reversed);
- last = g_list_last (reversed);
- for (l = last; l != NULL; l = l->prev)
+ for (l = reversed; l != NULL; l = l->next)
{
if (filter_function (l->data, user_data))
{