[nautilus/wip/antoniof/try-admin-backend-for-file-ops: 133/134] file-operations: Use g_file_enumerator_get_child
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/try-admin-backend-for-file-ops: 133/134] file-operations: Use g_file_enumerator_get_child
- Date: Sat, 27 Nov 2021 20:34:52 +0000 (UTC)
commit d48bddbd1d853effe649207eef575623d9347939
Author: António Fernandes <antoniof gnome org>
Date: Thu Oct 14 18:37:22 2021 +0100
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.
src/nautilus-file-operations.c | 6 ++----
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]