mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Break on recv/send errors
This commit is contained in:
@@ -21,8 +21,10 @@ Work in progress
|
|||||||
- Removed `CTRL`; just use keys now.
|
- Removed `CTRL`; just use keys now.
|
||||||
- bugfix:
|
- bugfix:
|
||||||
- prevent panic in set_progress, for progress values `> 100.0 or < 0.0`
|
- prevent panic in set_progress, for progress values `> 100.0 or < 0.0`
|
||||||
|
- Fixed FTP get, which didn't finalize the reader
|
||||||
- dependencies:
|
- dependencies:
|
||||||
- updated `textwrap` to `0.13.0`
|
- updated `textwrap` to `0.13.0`
|
||||||
|
- updated `ftp4` to `4.0.1`
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
|
|||||||
@@ -171,7 +171,9 @@ impl FileTransferActivity {
|
|||||||
while buf_start < bytes_read {
|
while buf_start < bytes_read {
|
||||||
// Write bytes
|
// Write bytes
|
||||||
match rhnd.write(&buffer[buf_start..bytes_read]) {
|
match rhnd.write(&buffer[buf_start..bytes_read]) {
|
||||||
Ok(bytes) => buf_start += bytes,
|
Ok(bytes) => {
|
||||||
|
buf_start += bytes;
|
||||||
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
self.log(
|
self.log(
|
||||||
LogLevel::Error,
|
LogLevel::Error,
|
||||||
@@ -204,6 +206,7 @@ impl FileTransferActivity {
|
|||||||
Color::Red,
|
Color::Red,
|
||||||
format!("Could not read local file: {}", err),
|
format!("Could not read local file: {}", err),
|
||||||
));
|
));
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Increase progress
|
// Increase progress
|
||||||
@@ -441,6 +444,7 @@ impl FileTransferActivity {
|
|||||||
err
|
err
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,6 +460,7 @@ impl FileTransferActivity {
|
|||||||
Color::Red,
|
Color::Red,
|
||||||
format!("Could not read remote file: {}", err),
|
format!("Could not read remote file: {}", err),
|
||||||
));
|
));
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Set progress
|
// Set progress
|
||||||
|
|||||||
Reference in New Issue
Block a user