From 1eace79f7788bb27f5c63cfc674dde3e51be7d8a Mon Sep 17 00:00:00 2001 From: many Date: Thu, 15 Oct 2020 13:38:29 +0200 Subject: [PATCH] change error message to be absolute --- meilisearch-http/src/snapshot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/snapshot.rs b/meilisearch-http/src/snapshot.rs index 980d491d0..0351aa26f 100644 --- a/meilisearch-http/src/snapshot.rs +++ b/meilisearch-http/src/snapshot.rs @@ -20,9 +20,9 @@ pub fn load_snapshot( if !db_path.exists() && snapshot_path.exists() { compression::from_tar_gz(snapshot_path, db_path) } else if db_path.exists() && !ignore_snapshot_if_db_exists { - Err(Error::Internal(format!("database already exists at {:?}, try to delete it or rename it", db_path))) + Err(Error::Internal(format!("database already exists at {:?}, try to delete it or rename it", db_path.canonicalize().unwrap_or(db_path.into())))) } else if !snapshot_path.exists() && !ignore_missing_snapshot { - Err(Error::Internal(format!("snapshot doesn't exist at {:?}", snapshot_path))) + Err(Error::Internal(format!("snapshot doesn't exist at {:?}", snapshot_path.canonicalize().unwrap_or(snapshot_path.into())))) } else { Ok(()) }