From efd08c855730d957900d0ccc4eea37fcd5e59b49 Mon Sep 17 00:00:00 2001 From: Haoran Xu <3230105281@zju.edu.cn> Date: Wed, 15 Jul 2026 15:35:37 +0800 Subject: [PATCH] fix: skills download archive filename mismatch with versioned skill names (#9270) --- astrbot/dashboard/services/skills_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/astrbot/dashboard/services/skills_service.py b/astrbot/dashboard/services/skills_service.py index 4bcc6f881..aa2cbc406 100644 --- a/astrbot/dashboard/services/skills_service.py +++ b/astrbot/dashboard/services/skills_service.py @@ -443,7 +443,11 @@ class SkillsService: export_dir = Path(get_astrbot_temp_path()) / "skill_exports" export_dir.mkdir(parents=True, exist_ok=True) zip_base = export_dir / skill_name - zip_path = zip_base.with_suffix(".zip") + # with_suffix(".zip") replaces only the last suffix (e.g. ".0" in + # "skill-writing-1.0.0"), producing "skill-writing-1.0.zip" — + # which mismatches shutil.make_archive's "skill-writing-1.0.0.zip". + # Append ".zip" to the full name instead. + zip_path = zip_base.with_name(zip_base.name + ".zip") if zip_path.exists(): zip_path.unlink()