From ef39bf95b3413febaaad79b29516ac2c0e0a7a4d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 3 Jun 2019 10:53:09 +0200 Subject: [PATCH] src/client/http_client.rs - upload_config: improve error message --- src/client/http_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 51defb23..3c5ef067 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -441,8 +441,8 @@ impl BackupClient { let file_name = file_name.to_owned(); let src_path = src_path.as_ref().to_owned(); - let task = tokio::fs::File::open(src_path) - .map_err(Error::from) + let task = tokio::fs::File::open(src_path.clone()) + .map_err(move |err| format_err!("unable to open file {:?} - {}", src_path, err)) .and_then(|file| { let contents = vec![]; tokio::io::read_to_end(file, contents)