修复:Windows 更新检查仅探测程序路径,避免慢磁盘校验超时
This commit is contained in:
@@ -197,7 +197,10 @@ def validate_release(envelope, root=ROOT):
|
||||
raise UpdateError('更新缺少必要程序文件。')
|
||||
if KEY not in old_files or digest(destination(root, KEY)) != old_files[KEY]['sha256']:
|
||||
raise UpdateError('更新信任公钥校验失败。')
|
||||
for name in set(old_files) | set(files):
|
||||
# 只探测本次会备份、删除或替换的程序路径;运行环境保持原样。
|
||||
# 完整清单仍逐项验证路径语法、重复项、摘要以及运行环境指纹。
|
||||
old_program = {name for name in old_files if program_path(name)}
|
||||
for name in old_program | set(files):
|
||||
destination(root, name)
|
||||
return release
|
||||
|
||||
|
||||
Reference in New Issue
Block a user