src/client/http_client.rs - upload_config: improve error message

This commit is contained in:
Dietmar Maurer 2019-06-03 10:53:09 +02:00
parent ec8a9bb953
commit ef39bf95b3
1 changed files with 2 additions and 2 deletions

View File

@ -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)