...
This commit is contained in:
@@ -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(),
|
||||
};
|
||||
|
Reference in New Issue
Block a user