diff --git a/app.py b/app.py index f735e7d..d4f6b75 100644 --- a/app.py +++ b/app.py @@ -638,6 +638,7 @@ def do_copy(src_dev, dst_dev, cfg): dup_mode = cfg.get('duplicate_handling', 'skip') copied_pairs = [] # [(src, dst)] erfolgreich kopiert skipped = 0 + io_errors = 0 # ── Phase 1: Kopieren ────────────────────────────────────────────── for i, f in enumerate(files): @@ -672,10 +673,16 @@ def do_copy(src_dev, dst_dev, cfg): try: shutil.copy2(f, tmp_f) # Erst in Temp-Datei kopieren os.replace(str(tmp_f), str(dst_f)) # Dann atomar umbenennen - except Exception: + except OSError as copy_err: try: tmp_f.unlink(missing_ok=True) except Exception: pass - raise + io_errors += 1 + add_log(f'⚠ Fehler bei {f.name}: {copy_err}') + with copy_lock: + copy_state.update(done=i+1, + progress=int((i+1)/total*100) if total else 100, + current=str(f.name)) + continue copied_pairs.append((f, dst_f)) with copy_lock: @@ -694,6 +701,8 @@ def do_copy(src_dev, dst_dev, cfg): msg_parts = [f'{len(copied_pairs)} kopiert'] if skipped: msg_parts.append(f'{skipped} übersprungen') + if io_errors: + msg_parts.append(f'{io_errors} Fehler (I/O)') # ── Phase 2: Verifizieren ────────────────────────────────────────── verify_errors = 0 diff --git a/version.txt b/version.txt index d941c12..e92964f 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.16 \ No newline at end of file +1.0.17 \ No newline at end of file