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

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