From 5670b4d0129ac0b627ea5fc9cf863b3648dd2d76 Mon Sep 17 00:00:00 2001 From: ad hoc Date: Mon, 16 May 2022 14:33:33 +0200 Subject: [PATCH] fix dump import error --- meilisearch-lib/src/index_controller/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/meilisearch-lib/src/index_controller/mod.rs b/meilisearch-lib/src/index_controller/mod.rs index 4cbba1e42..77ff2621b 100644 --- a/meilisearch-lib/src/index_controller/mod.rs +++ b/meilisearch-lib/src/index_controller/mod.rs @@ -196,10 +196,7 @@ impl IndexControllerBuilder { task_store_size, &indexer_options, )?; - } - - let db_exists = db_path.as_ref().exists(); - if db_exists { + } else if db_path.as_ref().exists() { // Directory could be pre-created without any database in. let db_is_empty = db_path.as_ref().read_dir()?.next().is_none(); if !db_is_empty {