src/client/http_client.rs - upload_config: improve error message
This commit is contained in:
parent
ec8a9bb953
commit
ef39bf95b3
|
@ -441,8 +441,8 @@ impl BackupClient {
|
||||||
let file_name = file_name.to_owned();
|
let file_name = file_name.to_owned();
|
||||||
let src_path = src_path.as_ref().to_owned();
|
let src_path = src_path.as_ref().to_owned();
|
||||||
|
|
||||||
let task = tokio::fs::File::open(src_path)
|
let task = tokio::fs::File::open(src_path.clone())
|
||||||
.map_err(Error::from)
|
.map_err(move |err| format_err!("unable to open file {:?} - {}", src_path, err))
|
||||||
.and_then(|file| {
|
.and_then(|file| {
|
||||||
let contents = vec![];
|
let contents = vec![];
|
||||||
tokio::io::read_to_end(file, contents)
|
tokio::io::read_to_end(file, contents)
|
||||||
|
|
Loading…
Reference in New Issue