fix(io.py): path改回传入文件地址,而不是传入文件夹地址

This commit is contained in:
LIghtJUNction
2025-10-26 15:41:20 +08:00
parent 4f4a9b9e55
commit 22c3b53ab8
3 changed files with 4 additions and 5 deletions
View File
+1 -1
View File
@@ -37,7 +37,7 @@ async def check_dashboard(astrbot_root: Path) -> None:
):
click.echo("正在安装管理面板...")
await download_dashboard(
path="data",
path="data/dashboard.zip",
extract_path=str(astrbot_root),
version=f"v{VERSION}",
latest=False,
+3 -4
View File
@@ -226,12 +226,11 @@ async def download_dashboard(
"""下载管理面板文件"""
if path is None:
_path = Path(get_astrbot_data_path()).absolute()
zip_path = Path(get_astrbot_data_path()).absolute() / "dashboard.zip"
else:
_path = Path(path).absolute()
zip_path = Path(path).absolute()
zip_path = _path / "dashboard.zip"
version_file = _path / "dist" / "assets" / "version"
version_file = zip_path.parent / "dist" / "assets" / "version"
if latest or len(str(version)) != 40:
ver_name = "latest" if latest else version