diff options
author | Ondrej Holy <oholy@redhat.com> | 2020-10-19 14:18:10 +0200 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2021-01-18 00:12:22 +0000 |
commit | 482b6b24d932b42a9b077e24cfe60a5f8ab4743f (patch) | |
tree | 15ab01d8fd2d9968d22784f7f5ca580478fe4470 | |
parent | d4d59231329efd692bc3498949ed79b4137c059b (diff) | |
download | nautilus-482b6b24d932b42a9b077e24cfe60a5f8ab4743f.tar.gz |
file-operations: Print number of natively moved files instead of zero
Currently, "Moved 0 files to ..." status is shown if all files were moved
during the initial phase. This is because the initial phase consists of
`g_file_move` calls with `G_FILE_COPY_NO_FALLBACK_FOR_MOVE` flag, however,
the status is printed for files which needs copy&delete fallback. Let's
print the total number of natively moved files in this case instead.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1635
-rw-r--r-- | src/nautilus-file-operations.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index 0294d6a8b..85c42f12f 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -6744,6 +6744,21 @@ nautilus_file_operations_move (GTask *task, goto aborted; } + if (fallbacks == NULL) + { + gint total; + + total = g_list_length (job->files); + + memset (&source_info, 0, sizeof (source_info)); + source_info.num_files = total; + memset (&transfer_info, 0, sizeof (transfer_info)); + transfer_info.num_files = total; + report_copy_progress (job, &source_info, &transfer_info); + + return; + } + /* The rest we need to do deep copy + delete behind on, * so scan for size */ |