fix(rustdb-storage): return empty collection list for missing databases

This commit is contained in:
2026-05-28 09:18:48 +00:00
parent 03fabaa26b
commit fd2c3ed63d
6 changed files with 1168 additions and 1940 deletions
+1 -1
View File
@@ -473,7 +473,7 @@ impl FileStorageAdapter {
fn list_collection_dirs(&self, db: &str) -> StorageResult<Vec<String>> {
let db_dir = self.db_dir(db);
if !db_dir.exists() {
return Err(StorageError::NotFound(format!("database '{db}'")));
return Ok(Vec::new());
}
let mut colls = Vec::new();
let entries = std::fs::read_dir(&db_dir)?;