diff options
author | Ondrej Holy <oholy@redhat.com> | 2020-10-19 14:18:10 +0200 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2021-01-17 22:50:56 +0000 |
commit | 3b7a84f12189d2cd58d2fe0caaa2e0d443bef800 (patch) | |
tree | 6614c89ad50a16395d0870bfe6e2e13e430add25 | |
parent | 1ebadd63c27ab682a08db9cb902092101f49f3c6 (diff) | |
download | nautilus-wip/oholy/progress-fixes.tar.gz |
file-operations: Print number of natively moved files instead of zerowip/oholy/progress-fixes
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 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 */ |