Wait, file_size in recv is completely useless

This commit is contained in:
ChristianVisintin
2020-12-03 13:43:40 +01:00
parent f8be6b7fac
commit 175acd9f5b
3 changed files with 6 additions and 14 deletions

View File

@@ -299,7 +299,7 @@ impl FileTransferActivity {
Ok(mut local_file) => {
// Download file from remote
match self.client.recv_file(file.abs_path.as_path()) {
Ok((mut rhnd, file_size)) => {
Ok(mut rhnd) => {
// Set popup progress
self.input_mode = InputMode::Popup(PopupType::Progress(format!(
"Downloading \"{}\"...",
@@ -340,7 +340,7 @@ impl FileTransferActivity {
),
}
// Set progress
self.set_progress(total_bytes_written, file_size);
self.set_progress(total_bytes_written, file.size);
// Draw only if a significant progress has been made (performance improvement)
if last_progress_val + 0.5 >= self.transfer_progress {
// Draw