fix: 校验顺序改路径字典序(显示直观) + 测试时序稳定性

This commit is contained in:
AskaEth committed 2026-08-22 15:06:55 +08:00
1 parent 0b28d26a18
commit 2e505f6ea3
2 files changed
+10 -2

No files matched your search

+4 -2
View File
@@ -115,8 +115,10 @@ def verify_recent_files(src_dir: str, dst_dir: str, check_count: int = 5,
full = os.path.join(root, name)
recent.append((os.path.getmtime(full), os.path.relpath(full, dst_dir)))
recent.sort(reverse=True)
total = min(check_count, len(recent))
for idx, (_mtime, rel) in enumerate(recent[:check_count], 1):
# 选择最新 N 个 (按 mtime), 校验/显示顺序按路径字典序 (直观连续)
selected = sorted(rel for _mtime, rel in recent[:check_count])
total = len(selected)
for idx, rel in enumerate(selected, 1):
sp = os.path.join(src_dir, rel)
tp = os.path.join(dst_dir, rel)
if not os.path.isfile(sp):