fix: bios migration says each error once

biosmigrate printed its progress and each failed copy, then migrate.py printed the same failures again. The library now says its steps through the caller's callback and returns the failures, and the command prints each once.
This commit is contained in:
Abdessamad Derraz committed 2026-11-23 23:07:45 +01:00
1 parent e62332b4c6
commit f896893b6e
4 files changed
+95 -14

No files matched your search

+2 -2
View File
@@ -56,14 +56,14 @@ def main() -> None:
print("=== Phase 1: Local files (libretro branch) ===")
moved, skipped, errors, existing_hashes = migrate_local(
source, target, args.dry_run
source, target, args.dry_run, print
)
action = "Would copy" if args.dry_run else "Copied"
print(f"\n{action} {moved} files, skipped {skipped}")
if args.include_branches:
print("\n=== Phase 2: Extracting from other branches ===")
branch_count = extract_from_branches(target, args.dry_run, existing_hashes)
branch_count = extract_from_branches(target, args.dry_run, existing_hashes, print)
print(f"\n{action} {branch_count} additional files from branches")
moved += branch_count