diff options
author | António Fernandes <antoniof@gnome.org> | 2021-10-14 18:37:22 +0100 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2021-11-27 20:34:20 +0000 |
commit | d48bddbd1d853effe649207eef575623d9347939 (patch) | |
tree | 7ec3ad2782766e0948af23b8abd3d164c3686509 | |
parent | 04a8104e5fa36780f00c9b67d50a2b8345c1fc6b (diff) | |
download | nautilus-d48bddbd1d853effe649207eef575623d9347939.tar.gz |
file-operations: Use g_file_enumerator_get_child
As documented, this is a convenience method that's equivalent to our
existing code, assuming the directory at hand is the enumerator
container.
Also, this convenience method remains correct if the enumerator
container is different, which is going to be the case soon, as we
introduce support for retrying with admin:// URIs.
-rw-r--r-- | src/nautilus-file-operations.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index f55bf48c2..ac96b1142 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -3258,8 +3258,7 @@ retry: if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) { - subdir = g_file_get_child (dir, - g_file_info_get_name (info)); + subdir = g_file_enumerator_get_child (enumerator, info); subdirs = g_list_prepend (subdirs, subdir); } @@ -4766,8 +4765,7 @@ retry: while (!job_aborted (job) && (info = g_file_enumerator_next_file (enumerator, job->cancellable, skip_error ? NULL : &error)) != NULL) { - src_file = g_file_get_child (src, - g_file_info_get_name (info)); + src_file = g_file_enumerator_get_child (enumerator, info); copy_move_file (copy_job, src_file, *dest, same_fs, FALSE, &dest_fs_type, source_info, transfer_info, NULL, FALSE, &local_skipped_file, readonly_source_fs); |