[nautilus/wip/antoniof/try-admin-backend-for-file-ops: 10/11] 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: 10/11] file-operations: Use g_file_enumerator_get_child
- Date: Sat, 16 Oct 2021 14:02:31 +0000 (UTC)
commit 1eb52f1928236b6e36e3a8b5dd0846e829eefade
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 ff1fa1d05..d9f43587e 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -3281,8 +3281,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);
}
@@ -4789,8 +4788,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]