Commit 49c753b1 authored by Cosimo Cecchi's avatar Cosimo Cecchi

file-operations: fix off-by-one error in copied files count

TransferInfo->num_files counts from zero, so we have to increment it by
one when formatting it into a string.

https://bugzilla.gnome.org/show_bug.cgi?id=673345
parent 9b762008
......@@ -2920,14 +2920,14 @@ report_copy_progress (CopyMoveJob *copy_job,
_("Moving file %'d of %'d (in \"%B\") to \"%B\"")
:
_("Copying file %'d of %'d (in \"%B\") to \"%B\""),
transfer_info->num_files,
transfer_info->num_files + 1,
source_info->num_files,
(GFile *)copy_job->files->data,
copy_job->destination));
} else {
nautilus_progress_info_take_status (job->progress,
f (_("Duplicating file %'d of %'d (in \"%B\")"),
transfer_info->num_files,
transfer_info->num_files + 1,
source_info->num_files,
(GFile *)copy_job->files->data));
}
......@@ -2938,13 +2938,13 @@ report_copy_progress (CopyMoveJob *copy_job,
_("Moving file %'d of %'d to \"%B\"")
:
_ ("Copying file %'d of %'d to \"%B\""),
transfer_info->num_files,
transfer_info->num_files + 1,
source_info->num_files,
copy_job->destination));
} else {
nautilus_progress_info_take_status (job->progress,
f (_("Duplicating file %'d of %'d"),
transfer_info->num_files,
transfer_info->num_files + 1,
source_info->num_files));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment