summaryrefslogtreecommitdiff
path: root/src/nautilus-file-operations.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nautilus-file-operations.c')
-rw-r--r--src/nautilus-file-operations.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 1be9770be..084ea1469 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -188,6 +188,15 @@ typedef struct
OpKind op;
guint64 last_report_time;
int last_reported_files_left;
+
+ /*
+ * This is used when reporting progress for copy/move operations to not show
+ * the remaining time. This is needed because some GVfs backends doesn't
+ * report progress from those operations. Consequently it looks like that it
+ * is hanged when the remaining time is not updated regularly. See:
+ * https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/605
+ */
+ gboolean partial_progress;
} TransferInfo;
typedef struct
@@ -4149,7 +4158,8 @@ report_copy_progress (CopyMoveJob *copy_job,
}
if (elapsed < SECONDS_NEEDED_FOR_RELIABLE_TRANSFER_RATE ||
- transfer_rate == 0)
+ transfer_rate == 0 ||
+ !transfer_info->partial_progress)
{
if (source_info->num_files == 1)
{
@@ -5181,6 +5191,12 @@ copy_file_progress_callback (goffset current_num_bytes,
pdata = user_data;
+ if (current_num_bytes != 0 &&
+ current_num_bytes != total_num_bytes)
+ {
+ pdata->transfer_info->partial_progress = TRUE;
+ }
+
new_size = current_num_bytes - pdata->last_size;
if (new_size > 0)