[nautilus/dbus-trash: 12/15] dbus-manager: Use a more robust copy operation
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/dbus-trash: 12/15] dbus-manager: Use a more robust copy operation
- Date: Tue, 7 Aug 2018 19:16:13 +0000 (UTC)
commit dbdbd0eb9ab2d6acccbb48964f18fff3b3c2eb3c
Author: Carlos Soriano <csoriano redhat com>
Date: Tue Aug 7 10:47:28 2018 +0200
dbus-manager: Use a more robust copy operation
We were using the copy_file operation which seems to be quite buggy,
Nautilus should probably drop that one soon, specially since no other
part of Nautilus uses it.
src/nautilus-dbus-manager.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
index cc1cd75c0..91cc75fbc 100644
--- a/src/nautilus-dbus-manager.c
+++ b/src/nautilus-dbus-manager.c
@@ -143,22 +143,17 @@ handle_copy_uris (NautilusDBusFileOperations *object,
const gchar *destination)
{
GList *source_files = NULL;
- GFile *dest_dir;
gint idx;
- dest_dir = g_file_new_for_uri (destination);
-
for (idx = 0; sources[idx] != NULL; idx++)
{
- source_files = g_list_prepend (source_files,
- g_file_new_for_uri (sources[idx]));
+ source_files = g_list_prepend (source_files, g_strdup (sources[idx]));
}
- nautilus_file_operations_copy_async (source_files, dest_dir, NULL, NULL, NULL);
-
- g_list_free_full (source_files, g_object_unref);
- g_object_unref (dest_dir);
+ nautilus_file_operations_copy_move (source_files, destination,
+ GDK_ACTION_COPY, NULL, NULL, NULL);
+ g_list_free_full (source_files, g_free);
nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
return TRUE; /* invocation was handled */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]