mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	Bug(FS): Consider empty pre-created directory as unexisting DB
This commit is contained in:
		| @@ -167,7 +167,11 @@ impl IndexControllerBuilder { | ||||
|  | ||||
|         let db_exists = db_path.as_ref().exists(); | ||||
|         if db_exists { | ||||
|             versioning::check_version_file(db_path.as_ref())?; | ||||
|             // 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 { | ||||
|                 versioning::check_version_file(db_path.as_ref())?; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if let Some(ref path) = self.import_snapshot { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user