diff --git a/scripts/account.py b/scripts/account.py index e5c91e1..d25318f 100644 --- a/scripts/account.py +++ b/scripts/account.py @@ -29,11 +29,16 @@ PLATFORM_URLS = { def get_data_root(): - return (os.getenv("JIANGCHANG_DATA_ROOT") or os.path.join(os.path.expanduser("~"), ".jiangchang-data")).strip() + env = (os.getenv("JIANGCHANG_DATA_ROOT") or "").strip() + if env: + return env + if sys.platform == "win32": + return r"D:\jiangchang-data" + return os.path.join(os.path.expanduser("~"), ".jiangchang-data") def get_user_id(): - uid = (os.getenv("JIANGCHANG_USER_ID") or os.getenv("OPENCLAW_USER_ID") or "").strip() + uid = (os.getenv("JIANGCHANG_USER_ID") or "").strip() return uid or "_anon"