[nautilus/wip/oholy/progress-fixes: 90/90] file-operations: Print number of natively moved files instead of zero
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/progress-fixes: 90/90] file-operations: Print number of natively moved files instead of zero
- Date: Sun, 17 Jan 2021 22:50:58 +0000 (UTC)
commit 3b7a84f12189d2cd58d2fe0caaa2e0d443bef800
Author: Ondrej Holy <oholy redhat com>
Date: Mon Oct 19 14:18:10 2020 +0200
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]