From 42f023e69ca0351bd8412a68cf92ffe8338fb4a9 Mon Sep 17 00:00:00 2001 From: xz Date: Sun, 22 Nov 2026 18:55:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A7=E5=B0=8F=E4=B8=BA0=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=96=87=E4=BB=B6=E4=B8=8D=E4=BC=9A=E8=A2=AB?= =?UTF-8?q?=E6=89=93=E5=8D=B0=20and?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 6 ++++-- lang/zh_cn.lang | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 148cf09..6bbc872 100644 --- a/app.py +++ b/app.py @@ -38,20 +38,22 @@ def print_info(hash_to_files_list: list = runing_data.hash_to_files): size_if_one = 0 print_size_total = 0 print_size_if_one = 0 + count = 0 for t in runing_data.hash_to_files: st_size = os.stat(runing_data.hash_to_files[t][0]).st_size size_total += st_size * len(runing_data.hash_to_files[t]) size_if_one += st_size - if st_size <= config.flag_size: + if st_size < config.flag_size: continue print_size_total += st_size * len(runing_data.hash_to_files[t]) print_size_if_one += st_size if len(runing_data.hash_to_files[t]) > 1: + count += 1 print(t, f"size: {st_size} Byte") for fp in runing_data.hash_to_files[t]: print("\t", fp) print() - if size_total == size_if_one: + if count == 0: print(config.l10n_data.get_text("info_print_info_not_duplicate_msg")) size_duplicate = size_total - size_if_one diff --git a/lang/zh_cn.lang b/lang/zh_cn.lang index d7f79f9..7267d5f 100644 --- a/lang/zh_cn.lang +++ b/lang/zh_cn.lang @@ -1,4 +1,4 @@ -help_fsize = 只打印文件大小大于fsize Byte的重复文件 +help_fsize = 只打印文件大小不小于fsize Byte的重复文件 tip_traverse_dir = 正在遍历文件ing... info_traverse_dir = 完成 总计 {} 个文件 tip_hash_files_from_glist = 正在计算文件散列ing...