Blame SOURCES/0004-dbus-manager-Use-a-more-robust-copy-operation.patch

af40a0
From ef022816e3fe321d9ee9b5a2deab96ca718f7215 Mon Sep 17 00:00:00 2001
af40a0
From: Carlos Soriano <csoriano@redhat.com>
af40a0
Date: Tue, 7 Aug 2018 10:47:28 +0200
af40a0
Subject: [PATCH 04/11] dbus-manager: Use a more robust copy operation
af40a0
af40a0
We were using the copy_file operation which seems to be quite buggy,
af40a0
Nautilus should probably drop that one soon, specially since no other
af40a0
part of Nautilus uses it.
af40a0
---
af40a0
 src/nautilus-dbus-manager.c | 13 ++++---------
af40a0
 1 file changed, 4 insertions(+), 9 deletions(-)
af40a0
af40a0
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
af40a0
index bce6b5c4d..8135c9650 100644
af40a0
--- a/src/nautilus-dbus-manager.c
af40a0
+++ b/src/nautilus-dbus-manager.c
af40a0
@@ -150,22 +150,17 @@ handle_copy_uris (NautilusDBusFileOperations  *object,
af40a0
                   const gchar                 *destination)
af40a0
 {
af40a0
     GList *source_files = NULL;
af40a0
-    GFile *dest_dir;
af40a0
     gint idx;
af40a0
 
af40a0
-    dest_dir = g_file_new_for_uri (destination);
af40a0
-
af40a0
     for (idx = 0; sources[idx] != NULL; idx++)
af40a0
     {
af40a0
-        source_files = g_list_prepend (source_files,
af40a0
-                                       g_file_new_for_uri (sources[idx]));
af40a0
+        source_files = g_list_prepend (source_files, g_strdup (sources[idx]));
af40a0
     }
af40a0
 
af40a0
-    nautilus_file_operations_copy (source_files, dest_dir, NULL, NULL, NULL);
af40a0
-
af40a0
-    g_list_free_full (source_files, g_object_unref);
af40a0
-    g_object_unref (dest_dir);
af40a0
+    nautilus_file_operations_copy_move (source_files, destination,
af40a0
+                                        GDK_ACTION_COPY, NULL, NULL, NULL);
af40a0
 
af40a0
+    g_list_free_full (source_files, g_free);
af40a0
     nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
af40a0
     return TRUE; /* invocation was handled */
af40a0
 }
af40a0
-- 
af40a0
2.17.1
af40a0