From 38176181ac44120a63d5b1cf15177bd337e5a9ed Mon Sep 17 00:00:00 2001 From: Irevoire Date: Thu, 13 Jan 2022 12:23:02 +0100 Subject: [PATCH] fix(dump): Fix the import of dump from the v24 and before --- meilisearch-auth/src/dump.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meilisearch-auth/src/dump.rs b/meilisearch-auth/src/dump.rs index f93221ed6..4b7365005 100644 --- a/meilisearch-auth/src/dump.rs +++ b/meilisearch-auth/src/dump.rs @@ -29,6 +29,10 @@ impl AuthController { let keys_file_path = src.as_ref().join(KEYS_PATH); + if !keys_file_path.exists() { + return Ok(()); + } + let mut reader = BufReader::new(File::open(&keys_file_path)?).lines(); while let Some(key) = reader.next().transpose()? { let key = serde_json::from_str(&key)?;