put: announce each uploaded file in the view
The SFTP transfer only reported through the progress bar's label, which disappears once a prompt parked the widget: the upload then ran in silence. A message per file names what is flowing whether the widget is live or gone.
This commit is contained in:
1 parent
e9b210e20a
commit
987eb1446b
1 file changed
+4
@@ -278,6 +278,10 @@ fn sftp_transfer(
|
|||||||
};
|
};
|
||||||
let remote = format!("{incoming}/{name}");
|
let remote = format!("{incoming}/{name}");
|
||||||
let label = format!("Uploading {name}");
|
let label = format!("Uploading {name}");
|
||||||
|
// Named before each file, not only in the progress label: when the
|
||||||
|
// view was released for a prompt, the progress bar is gone and this
|
||||||
|
// plain line is the only narration of which file is flowing
|
||||||
|
view.message(&label);
|
||||||
let on_progress = |uploaded: u64| view.progress(&label, uploaded as usize, size as usize);
|
let on_progress = |uploaded: u64| view.progress(&label, uploaded as usize, size as usize);
|
||||||
let result = ssh::upload_file(&sftp, path, &remote, host, &on_progress);
|
let result = ssh::upload_file(&sftp, path, &remote, host, &on_progress);
|
||||||
if let Err(e) = result {
|
if let Err(e) = result {
|
||||||
|
|||||||
Reference in new issue
Block a user