From 8bc393795694175b58b045120b1f58aa68c2bcb1 Mon Sep 17 00:00:00 2001 From: Tobias Leuschner Date: Sat, 9 May 2026 10:39:30 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Verbesserung=20der=20Abbruchbehandlung?= =?UTF-8?q?=20w=C3=A4hrend=20des=20Kopiervorgangs=20und=20Versionsnummer?= =?UTF-8?q?=20auf=201.0.16=20erh=C3=B6ht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 21 ++++++++++++--------- version.txt | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index adea06a..f735e7d 100644 --- a/app.py +++ b/app.py @@ -642,9 +642,10 @@ def do_copy(src_dev, dst_dev, cfg): # ── Phase 1: Kopieren ────────────────────────────────────────────── for i, f in enumerate(files): with copy_lock: - if not copy_state['running']: - add_log('Abgebrochen') - return + cancelled = not copy_state['running'] + if cancelled: + add_log('Abgebrochen') + return rel = f.relative_to(src_path) dst_f = dst_dir / rel dst_f.parent.mkdir(parents=True, exist_ok=True) @@ -708,12 +709,14 @@ def do_copy(src_dev, dst_dev, cfg): for i, (src_f, dst_f) in enumerate(copied_pairs): with copy_lock: - if not copy_state['running']: - add_log('Abgebrochen') - return - copy_state.update(done=i+1, - progress=int((i+1)/len(copied_pairs)*100), - current=src_f.name) + cancelled = not copy_state['running'] + if not cancelled: + copy_state.update(done=i+1, + progress=int((i+1)/len(copied_pairs)*100), + current=src_f.name) + if cancelled: + add_log('Abgebrochen') + return if _file_md5(src_f) == _file_md5(dst_f): verified_pairs.append((src_f, dst_f)) else: diff --git a/version.txt b/version.txt index 758a46e..d941c12 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.15 \ No newline at end of file +1.0.16 \ No newline at end of file