vmm: Improve restore error message about URL conversion

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-02-22 17:20:00 +00:00
parent 2122233047
commit deedfcdc35
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -2032,7 +2032,8 @@ impl Transportable for MemoryManager {
.to_file_path() .to_file_path()
.map_err(|_| { .map_err(|_| {
MigratableError::MigrateSend(anyhow!( MigratableError::MigrateSend(anyhow!(
"Could not convert file URL to a file path" "Could not convert file URL to a file path: {}",
destination_url
)) ))
}) })
.and_then(|path| { .and_then(|path| {
+4 -1
View File
@@ -17,7 +17,10 @@ pub fn url_to_path(url: &Url) -> std::result::Result<PathBuf, MigratableError> {
"file" => url "file" => url
.to_file_path() .to_file_path()
.map_err(|_| { .map_err(|_| {
MigratableError::MigrateSend(anyhow!("Could not convert file URL to a file path")) MigratableError::MigrateSend(anyhow!(
"Could not convert file URL to a file path: {}",
url.as_str()
))
}) })
.and_then(|path| { .and_then(|path| {
if !path.is_dir() { if !path.is_dir() {