fix email wrong -1 to process all file

This commit is contained in:
yichuan520030910320
2025-08-03 22:27:04 -07:00
parent 568cf597f4
commit 87c930d705
7 changed files with 73 additions and 25 deletions

View File

@@ -459,7 +459,13 @@ class LeannSearcher:
self.meta_path_str = f"{index_path}.meta.json"
if not Path(self.meta_path_str).exists():
raise FileNotFoundError(f"Leann metadata file not found at {self.meta_path_str}")
parent_dir = Path(index_path).parent
print(
f"Leann metadata file not found at {self.meta_path_str}, and you may need to rm -rf {parent_dir}"
)
raise FileNotFoundError(
f"Leann metadata file not found at {self.meta_path_str}, you may need to rm -rf {parent_dir}"
)
with open(self.meta_path_str, encoding="utf-8") as f:
self.meta_data = json.load(f)
backend_name = self.meta_data["backend_name"]