From 3b7a84f12189d2cd58d2fe0caaa2e0d443bef800 Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Mon, 19 Oct 2020 14:18:10 +0200 Subject: 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 --- src/nautilus-file-operations.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index 084ea1469..09f2d40f0 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -6741,6 +6741,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 */ -- cgit v1.2.1