[nautilus/gnome-3-36] clipboard: Fix incorrect item URIs collision check



commit c40258efafcb9a9d3ba42e0935cd2c5cb6f8717a
Author: Artem Serostanov <serostanov gmail com>
Date:   Sun Oct 6 02:43:24 2019 +0300

    clipboard: Fix incorrect item URIs collision check
    
    Nautilus is supposed to clear items in the clipboard in case when
    items moved by drag-and-drop were were present in the clipboard.
    
    However, the item URI collision check algorithm compares moved (or copied)
    items with themselves instead of clipboard contents, resulting in the
    clipboard being cleared on every drag-and-drop operation.
    
    Fix the algorithm to address this issue.
    
    Closes: https://gitlab.gnome.org/GNOME/nautilus/issues/1235

 src/nautilus-clipboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-clipboard.c b/src/nautilus-clipboard.c
index 5a5b0a9e1..97264bc63 100644
--- a/src/nautilus-clipboard.c
+++ b/src/nautilus-clipboard.c
@@ -211,7 +211,7 @@ nautilus_clipboard_clear_if_colliding_uris (GtkWidget   *widget,
 
     for (l = (GList *) item_uris; l; l = l->next)
     {
-        if (g_list_find_custom ((GList *) item_uris, l->data,
+        if (g_list_find_custom ((GList *) clipboard_item_uris, l->data,
                                 (GCompareFunc) g_strcmp0))
         {
             collision = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]