diff --git a/config/__init__.py b/config/__init__.py index 2cdd9e6..bfdf7ef 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -42,7 +42,7 @@ def _load_dotenv(): # 2) settings.json(数据根下的统一配置) data_root = os.environ.get("ASTRION_DATA_ROOT", str(Path.home() / ".astrion" / "astrion")) - settings_path = Path(data_root) / "settings.json" + settings_path = Path(data_root).expanduser() / "settings.json" if settings_path.exists(): try: settings = json.loads(settings_path.read_text(encoding="utf-8"))