find . -name "*.zip" | while read -r zip_file; do
    target_dir="${zip_file%.zip}"
    
    echo "🔍 检查 $zip_file ..."
    # 尝试列出文件并静默测试
    if unzip -tq "$zip_file" > /dev/null 2>&1; then
        # -u (update) 参数：只解压比磁盘上更新的文件或缺失的文件
        unzip -uq "$zip_file" -d "$target_dir"
        echo "✨ $target_dir 已同步至最新"
    else
        echo "❌ 警告：$zip_file 压缩包本身可能损坏，跳过。"
    fi
done
