fix: Windows path — use LOCALAPPDATA\hermes

This commit is contained in:
git_alhan committed 2026-06-12 19:16:26 +00:00
1 parent 90af41044b
commit e0ad347474
1 file changed
+9 -7
+9 -7
View File
@@ -19,13 +19,15 @@ from typing import Optional
# ── Helpers ────────────────────────────────────────────────────────── # ── Helpers ──────────────────────────────────────────────────────────
def _hermes_home() -> Path: def _hermes_home() -> Path:
import os import os, sys
# Windows'ta Hermes %LOCALAPPDATA%\hermes kullanir, ~/.hermes degil # Hermes'in resmi yolunu bul
try: if "HERMES_HOME" in os.environ:
from hermes_constants import get_hermes_home return Path(os.environ["HERMES_HOME"])
return Path(get_hermes_home()) # Windows: %LOCALAPPDATA%\hermes
except ImportError: if sys.platform == "win32":
return Path(os.environ.get("HERMES_HOME", os.path.expanduser("~/.hermes"))) localappdata = os.environ.get("LOCALAPPDATA", os.path.expanduser("~"))
return Path(localappdata) / "hermes"
return Path(os.path.expanduser("~/.hermes"))
def _as_float(v): def _as_float(v):