This commit is contained in:
2025-04-09 08:51:55 +02:00
parent 84c656983a
commit f938e8ff6b
4 changed files with 34 additions and 3 deletions

View File

@@ -63,9 +63,14 @@ impl Collection {
// Delete existing collection data if any
println!("DEBUG: Deleting existing collection data from Redis key 'collections:{}'", self.name);
self.storage.delete_collection(&self.name)?;
// Store the collection's path in Redis
// Store the collection's full absolute path in Redis
let absolute_path = std::fs::canonicalize(&self.path)
.unwrap_or_else(|_| self.path.clone())
.to_string_lossy()
.to_string();
println!("DEBUG: Storing collection path in Redis key 'collections:{}:path'", self.name);
self.storage.store_collection_path(&self.name, &absolute_path)?;
self.storage.store_collection_path(&self.name, &self.path.to_string_lossy())?;
// Walk through the directory