This commit is contained in:
2025-04-09 08:11:28 +02:00
parent b9df692a54
commit 1f155d1bfb
5 changed files with 96 additions and 5 deletions

View File

@@ -207,9 +207,21 @@ impl DocTree {
return Err(DocTreeError::CollectionNotFound(name.to_string()));
}
// Try to get the collection's path from Redis
let path = match self.storage.get_collection_path(name) {
Ok(path_str) => {
println!("DEBUG: Found collection path in Redis: {}", path_str);
PathBuf::from(path_str)
},
Err(e) => {
println!("DEBUG: Could not retrieve collection path from Redis: {}", e);
PathBuf::new() // Fallback to empty path if not found
}
};
// Create a new collection
let collection = Collection {
path: PathBuf::new(), // We don't have the path, but it's not needed for Redis operations
path,
name: name.to_string(),
storage: self.storage.clone(),
};
@@ -236,9 +248,21 @@ impl DocTree {
continue;
}
// Try to get the collection's path from Redis
let path = match self.storage.get_collection_path(&name) {
Ok(path_str) => {
println!("DEBUG: Found collection path in Redis: {}", path_str);
PathBuf::from(path_str)
},
Err(e) => {
println!("DEBUG: Could not retrieve collection path from Redis: {}", e);
PathBuf::new() // Fallback to empty path if not found
}
};
// Create a new collection
let collection = Collection {
path: PathBuf::new(), // We don't have the path, but it's not needed for Redis operations
path,
name: name.clone(),
storage: self.storage.clone(),
};