From 06eb1ef92789043a76bf00355474af595ddf53f2 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Mon, 1 Mar 2021 18:46:03 +1100 Subject: [PATCH] fixed BUG-27, duplicate count per same named files in 2 dirs, was always 1 --- BUGs | 1 - files.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/BUGs b/BUGs index f1c167f..38c123a 100644 --- a/BUGs +++ b/BUGs @@ -4,4 +4,3 @@ BUG-25: file counts are wacky, now? file_details = 7 of 3?!? BUG-26: when choosing between duplicate dirs to keep, the radio buytton is not unique per directory, so if you have 10 sets of dirs, only the bottom one has a green option -BUG-27: I believe count of duplicate files per directory (is 1 each time), is incorrect (see 20150830-alana-lesl*) diff --git a/files.py b/files.py index 19ad674..51dc053 100644 --- a/files.py +++ b/files.py @@ -276,8 +276,8 @@ def fix_dups(): # (MOST COMMON, and I think we dont care per file, just per path) elif d1 != dups[hash][0]['d']: if d1 != '': - dup_cnt=1 per_path_dups.append({'count': dup_cnt, 'd1': d1, 'd2': d2, 'did1': did1, 'did2': did2, 'hashes' : hashes }) + dup_cnt=1 d1 = dups[hash][0]['d'] d2 = dups[hash][1]['d'] did1 = dups[hash][0]['did'] @@ -290,7 +290,6 @@ def fix_dups(): if d1 != '': per_path_dups.append({'count': dup_cnt, 'd1': d1, 'd2': d2, 'did1': did1, 'did2': did2, 'hashes' : hashes }) - print( f"msg={request.form['fe_msg_id']}" ) return render_template("dups.html", per_file_dups=per_file_dups, per_path_dups=per_path_dups, fe_msg_id=request.form['fe_msg_id'] ) @app.route("/rm_dups", methods=["POST"])