fix: match the correct file suffix

This commit is contained in:
Lin Chengfeng
2024-03-16 13:18:06 +08:00
committed by Horror Proton
parent 2c3bbea19a
commit b89b3d44fd

View File

@@ -154,7 +154,7 @@ class Updater:
assets_name = assets["name"] # 示例值:MAA-v4.24.0-beta.1-win-arm64.zip
# 正则匹配(用于选择当前系统及架构的版本)
# 在线等一个不这么蠢的方法
pattern = r"^MAA-.*" + re.escape(system_platform)
pattern = r"^MAA-.*-" + re.escape(system_platform) + r"\.(zip|tar\.gz)$"
match = re.match(pattern, assets_name)
if match:
# Mirrors镜像列表