From dfaeb19566862bb36d10d836350b8f4be849d0a6 Mon Sep 17 00:00:00 2001 From: Irevoire Date: Thu, 13 Jan 2022 12:30:58 +0100 Subject: [PATCH] fix(dump): Fix the import of dumps when there is no data.ms --- meilisearch-lib/src/index_controller/dump_actor/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meilisearch-lib/src/index_controller/dump_actor/mod.rs b/meilisearch-lib/src/index_controller/dump_actor/mod.rs index c44941b78..9872d8254 100644 --- a/meilisearch-lib/src/index_controller/dump_actor/mod.rs +++ b/meilisearch-lib/src/index_controller/dump_actor/mod.rs @@ -186,6 +186,10 @@ pub fn load_dump( let mut meta_file = File::open(&meta_path)?; let meta: MetadataVersion = serde_json::from_reader(&mut meta_file)?; + if !dst_path.as_ref().exists() { + std::fs::create_dir_all(dst_path.as_ref())?; + } + let tmp_dst = tempfile::tempdir_in(dst_path.as_ref())?; info!(