diff --git a/server/status/app.py b/server/status/app.py index bae358a..dc00b53 100644 --- a/server/status/app.py +++ b/server/status/app.py @@ -41,7 +41,7 @@ import server.state as state @status_bp.route('/api/app/version') @api_login_required def get_app_version_info(): - project_root = Path(__file__).resolve().parent.parent + project_root = Path(__file__).resolve().parent.parent.parent version_code, version_name = _parse_android_version_from_gradle(project_root) apk_path = _resolve_android_apk_path(project_root) apk_exists = apk_path.exists() @@ -73,7 +73,7 @@ def get_app_version_info(): @status_bp.route('/api/app/apk/latest') def download_latest_apk(): - project_root = Path(__file__).resolve().parent.parent + project_root = Path(__file__).resolve().parent.parent.parent apk_path = _resolve_android_apk_path(project_root) if not apk_path.exists(): return jsonify({"success": False, "error": "APK 不存在,请先构建 release 包"}), 404