mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix(46-index-path-resolution): remove unnecessary Windows backslash replace in discussion.py (PATH-06)
- ai_path_str from canonical index already uses forward slashes (per PATH-01)
- pathlib.Path on Windows handles forward slashes natively
- os.name conditional and replace('/','\\') were unnecessary noise
This commit is contained in:
parent
e050a1de49
commit
3e8817efef
1 changed files with 2 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ def _build_ai_dir(vault: Path, domain: str, key: str, title: str) -> Path:
|
|||
lit_root = paths["literature"]
|
||||
except Exception:
|
||||
# Fallback to default structure if config loading fails
|
||||
lit_root = vault / "03_Resources" / "Literature"
|
||||
lit_root = vault / "Resources" / "Literature"
|
||||
title_slug = slugify_filename(title) if title else key
|
||||
ai_dir = lit_root / domain / f"{key} - {title_slug}" / "ai"
|
||||
return ai_dir
|
||||
|
|
@ -263,7 +263,7 @@ def record_session(
|
|||
# --- Build paths (WS-03: use ai_path from canonical index) ---
|
||||
ai_path_str = meta.get("ai_path", "")
|
||||
if ai_path_str:
|
||||
ai_dir = vault_path / ai_path_str.replace("/", "\\") if os.name == "nt" else vault_path / ai_path_str
|
||||
ai_dir = vault_path / ai_path_str
|
||||
else:
|
||||
# Fallback: construct from metadata
|
||||
ai_dir = _build_ai_dir(vault_path, domain, zotero_key, paper_title)
|
||||
|
|
|
|||
Loading…
Reference in a new issue